Skip to main content

Ntient Client Library

Project description

NTIENT allows you to deploy and integrate AI models in minutes. This package interfaces with the API to manage models, deployments, and APIs.

Version: 0.2.0

Test Status:

Install with pip: pip install ntient

Support Model Types

  • Scikit-Learn
    • sklearn ExtraTreeClassifier
    • sklearn DecisionTreeClassifier
    • sklearn OneClassSVM
    • sklearn MLPClassifier
    • sklearn RadiusNeighborsClassifier
    • sklearn KNeighborsClassifier
    • sklearn ClassifierChain
    • sklearn MultiOutputClassifier
    • sklearn OutputCodeClassifier
    • sklearn OneVsOneClassifier
    • sklearn OneVsRestClassifier
    • sklearn SGDClassifier
    • sklearn RidgeClassifierCV
    • sklearn RidgeClassifier
    • sklearn PassiveAggressiveClassifier
    • sklearn GaussianProcessClassifier
    • sklearn VotingClassifier
    • sklearn AdaBoostClassifier
    • sklearn GradientBoostingClassifier
    • sklearn BaggingClassifier
    • sklearn ExtraTreesClassifier
    • sklearn RandomForestClassifier
    • sklearn BernoulliNB
    • sklearn CalibratedClassifierCV
    • sklearn GaussianNB
    • sklearn LabelPropagation
    • sklearn LabelSpreading
    • sklearn LinearDiscriminantAnalysis
    • sklearn LinearSVC
    • sklearn LogisticRegression
    • sklearn LogisticRegressionCV
    • sklearn MultinomialNB
    • sklearn NearestCentroid
    • sklearn NuSVC
    • sklearn Perceptron
    • sklearn QuadraticDiscriminantAnalysis
    • sklearn SVC
    • sklearn DPGMM
    • sklearn GMM
    • sklearn GaussianMixture
    • sklearn VBGMM
  • Deep Learning
    • keras
    • pytorch
  • Computer Vision
    • yoloV5

Usage

To use the package, you'll need to set a couple of environment variables.

  • NTIENT_HOST
  • NTIENT_TOKEN

Both of these can be gathered from the app. Using the package in a Jupyter Notebook will give you the chance to enter both of these, but if you plan to use the package headless, you'll need to set these in your environment beforehand.

Examples

Create a Model

Creating models is a foundational piece of the platform. This is the first step in deploying a model. There are two ways you can push a model: Jupyter, and *.py file. Both require you to have the trained model object available. You'll need your organization_id, which can be retrieved from the app as well.

Jupyter:

Using the package in Jupyter is the simplest setup. The package will prompt you to create the API specs as a part of the .push() command.

import ntient
...
# train model
...
model = ntient.Model(
    model={trained_model},
    organization={organization_id},
    name={model_name},
    model_type="sklearn DecisionTreeClassifier"
)
model.push()

Script

Using ntient in a script requires you to create the input and output mappings as dicts beforehand. Currently introspection is not supported in the package, so you have to know the input and output formats of your model.

import ntient
...
# train model
# Define input/output dicts
...
model = ntient.Model(
    model={trained_model},
    organization={organization_id},
    name={model_name},
    model_type="sklearn DecisionTreeClassifier",
    input_mapping_json=input_mapping_dict,
    output_mapping_json=output_mapping_dict
)
model.push()

Deploy a Model

model.deploy(environment={environment_name})

Methods

ntient.Model

  • orgainzation: str
  • name: str
  • model: dumped_model (currently supported: sklearn, pytorch, keras)
  • input_mapping_json: dict
  • output_mapping_json: dict
  • existing_model: bool (use if you're updating an existing model)

.deploy

  • deployment_name: str
  • environment: str
  • v_cores: int (default = 1)
  • instances: int (default = 1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ntient-0.2.0.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file ntient-0.2.0.tar.gz.

File metadata

  • Download URL: ntient-0.2.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for ntient-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bdbbddb67152535a714d71100a6ff34bea24b709ab5a0504cdb14bd14e16fc30
MD5 ba9297fc9417195f3b712daac2e0a7cc
BLAKE2b-256 903dcd917ad068b67d4b02a50c2d02d06e73ccfb90cd9bab71c4c7db495895ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page