Skip to main content

Your Open Source Data Science and MLOps Platform

Project description

MLIL Python Client

License PyPI GitHub stars

This package allows you to more easily interact with the MLIL platform from a Python interface.

Please note that this is a supplement to the JupyterLab instance in the platform and, as such, is not intended to replicate the end-to-end data science workflow that MLIL enables. Rather, this client is designed to make it easier to make requests to MLIL's model invocation, model management, and administrative API endpoints.

Basic usage

Installation

pip install mlinsightlab

Getting started

When first creating a MLILClient object, you'll be prompted to input your MLIL platform credentials, including the API key that you have been issued to interact with the platform. This information will be stored in a configuration file located at HOME/.mlil/config.json.

    >>> from mlinsightlab import MLILClient
    # creates a new client object
    >>> client = mlil.MLILClient() 

Now that you've logged in once, you'll be able to use these saved credentials to create MLILClient objects more easily in the future.

Basic usage

Now that you're authenticated, you can more easily interact with your deployment of MLIL!

# list all users on the platform
client.list_users()

# create a new user in the platform
client.create_user(role = 'user', api_key='mmm',username='Homer.Simpson', password='Doughnuts!')

# double-check a user's role
client.get_user_role(username='Homer.Simpson')

# verify a user's password

# issue a user a new password
client.issue_new_password(new_password='new_password') # by default updates the config.json file

# issue a user a new API key
client.issue_api_key(username='Homer.Simpson',password='new_password') # by default updates the config.json file

# delete a user
client.delete_user(username='Homer.Simpson', verbose=True

Now that your platform users are all set, it's time to manage and use your models.

# list models
client.list_models()

# predict - in this case model flavor is transformers, but you can use e.g. pyfunc, etc.
client.predict(model_name='GPT-AGI', model_flavor='transformers', model_version_or_alias='1',data='Hello AI overlord!'

If you've been working on the public library's computers, or just want to erase the config.json file containing your credentials, you can also do so via the Python client.

client.purge_credentials()

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

mlinsightlab-0.0.32.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlinsightlab-0.0.32-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file mlinsightlab-0.0.32.tar.gz.

File metadata

  • Download URL: mlinsightlab-0.0.32.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for mlinsightlab-0.0.32.tar.gz
Algorithm Hash digest
SHA256 a3461ca0c83ea0a0cdb2faaa533d63ff8508922f42529afdbf5480c2e61c08d2
MD5 a3ab1a8db005826a9640e5bec3f28281
BLAKE2b-256 cfc15b9ef13c476fb3a3d25e25d9c197ba9ce9156299509ab5441567a86358d5

See more details on using hashes here.

File details

Details for the file mlinsightlab-0.0.32-py3-none-any.whl.

File metadata

  • Download URL: mlinsightlab-0.0.32-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for mlinsightlab-0.0.32-py3-none-any.whl
Algorithm Hash digest
SHA256 169d9e77a38d977d4115d6fe105584b3f08b15a7b720baa853be6c994f47d3a0
MD5 d9d2d5773ee9189362f4dc2acc1d3940
BLAKE2b-256 4472d14b15d1dee3bb43e8238f28e25f66514af3d5f9b97f1fc2bd39c90fc077

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