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.1.9
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ntient-0.1.9.tar.gz.
File metadata
- Download URL: ntient-0.1.9.tar.gz
- Upload date:
- Size: 8.9 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.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1336640511988be95b16a454b22bf7f2c9f441c58aba44242f80e52795010843
|
|
| MD5 |
4cf22eb9f3dd1fc9d3ffeacedbe16b0c
|
|
| BLAKE2b-256 |
940af70912341e97577a67ce8d7237ef7483d0ce68a5dcd99ce9a4528c7eb833
|