MLIL Python Client
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()
Metadata
Release files for mlinsightlab 0.0.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mlinsightlab-0.0.36.tar.gz | 20.2 kB | Without provenance | Details for mlinsightlab-0.0.36.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mlinsightlab-0.0.36-py3-none-any.whl | Python 3 | none | any | Details for mlinsightlab-0.0.36-py3-none-any.whl |
Total release size: 43.6 kB
Release files / mlinsightlab-0.0.36.tar.gz
| Download URL | mlinsightlab-0.0.36.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c568c31870a72e2a2fce249b65f91f22a11fe2cb9450bd4c5474cd7ed10c014
|
|
BLAKE2b-256 checksum How to use checksums |
33b74c3dbccbbd64fbd768b0786bcd6776b572d608bf3e91f7407be9cb5a6ec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / mlinsightlab-0.0.36-py3-none-any.whl
| Download URL | mlinsightlab-0.0.36-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54fd18192610106b0bd25ae4eb67bc32c8c048e344752aad3f715e16fc5f9f44
|
|
BLAKE2b-256 checksum How to use checksums |
9856a044dee3f573fa9584cece58159d280708849ba6f5e871f49c6576d5db97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Security for mlinsightlab 0.0.36
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.