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.1.3

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.1.3.tar.gz (7.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: ntient-0.1.3.tar.gz
  • Upload date:
  • Size: 7.1 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.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for ntient-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7377a73f0bcb7bdeabbf93a2e524b46bd2d483535674f7e5062be0624c3f489f
MD5 16fd002fa3756a3cc1f2a80d3a32b0f5
BLAKE2b-256 923e5ab7da48472ea40af43bbf24e23d54d29d73cad8b9ce991b660281f4e7d4

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