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

Test Status:

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

Uploaded Source

File details

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

File metadata

  • Download URL: ntient-0.1.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for ntient-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6080a3ef226065e10a1a1614f904cbea8e7d9518de85180f83b66d37804da81c
MD5 5f2ff0a64c1e052f488f9867d9e052ac
BLAKE2b-256 d5bb2d3dcad097b2ee2f26bcd9b93f8eb5b7165e0ea29096ae47362f53ff3988

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