MLSteam Model SDK
Project description
mlsteam-model-sdk
SDK for accessing MLSteam models
Setup
pip3 install mlsteam-model-sdk
To process encrypted model versions, install the Themis development package according to the official instrunctions. Debian/Ubuntu users have a handy installation method:
# for users that already have administrator privileges
mlsteam-model-cli install-themisdev
# for those that need privilege lifting
sudo mlsteam-model-cli install-themisdev
Usage
Downloading a model version with SDK
This example assumes the program is running in an MLSteam system. If it is not the case, you may need to setup API_TOKEN with
mlsteam-model-cli init --api_token=YOUR_API_TOKEN
You will need administrator privileges to download or load encrypted model versions. For this case, either run the following program with
sudo
, or enter your password in asudo
prompt during program execution.sudo python your_program.pyor during execution
[sudo] password for some_username:
Administrator privileges are not required when you only process non-encrypted model versions.
from mlsteam_model_sdk.sdk.model import Model
sdk_model = Model()
sdk_model.download_model_version(project_name='project_owner/project_name',
model_name='model_name',
version_name='version_name')
By default, the model version will be downloaded at
$HOME/.mlsteam-model-sdk/models/download/
.
This loads a model version and makes prediction:
mv = sdk_model.load_model_version(model_name='model_name',
version_name='version_name')
outputs = mv.predict(inputs)
Importing a model version with CLI
This example assumes the following files are locally available:
- model version package (required)
- package encryption key (required only for encrypted packages)
You will need administrator privileges to download or load encrypted model versions, as mentioned in the previous example.
Initialize the SDK settings if you have not done so:
mlsteam-model-cli init
By default, the settings will be at
$HOME/.mlsteam-model-sdk/cfg.ini
.
To import a package:
# for non-encrypted packages
mlsteam-model-cli mv import-local -f path/to/pkg/file
# for encrypted packages
mlsteam-model-cli mv import-local -f path/to/pkg/file -k path/to/enckey/file
By default, the model and version names to register are read from the package manifest. You may customize these settings with the
--model_name
and--version_name
options.
If the operation is successful, you will find the imported pakage in local model registry:
mlsteam-model-cli mv list-local
muuid model_name vuuid version_name puuid packaged encrypted download_time ================================================================================================================ __local__ ... local-........ ... __local__ 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 Distributions
Built Distributions
File details
Details for the file mlsteam_model_sdk-0.4.1-cp311-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp311-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 136.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c851f2906b9066d8fad89c738d2f911fe60704e37ee6a851a5d9431d6501b9a2 |
|
MD5 | 32ad553572965b7d1446db252bab9897 |
|
BLAKE2b-256 | a91e2ed4fd657a713c24b9ec7a923f0990877363dac26f0d143b07d93927d84c |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp311-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp311-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 138.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd0f077eb6e28c400d2d62d522cd0998ce1bf2c8458e6025b8ab4cdcc5c9f771 |
|
MD5 | 9efd360d49bd78bf260cfb8f0f54a793 |
|
BLAKE2b-256 | c1ba259348369fb3c5b8521c2bd946392f4a6270a1fe40ab2be214e77856db6e |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp310-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp310-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 132.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69d63b79445559ce28c0fb9bb516a852291ef10102a3d4101e680d1c56f70f19 |
|
MD5 | 1f00b7b0b132e032f527f814b9023f97 |
|
BLAKE2b-256 | 98e693d624bb4dcaca85b2a7c5ddd4215ffa950f3a73ca3c6b41c6ce54a0bd04 |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp310-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp310-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 134.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06dda1078964c2d7c39df40b84a9c73b3330a6564c17c31621519c625026bbf2 |
|
MD5 | a8191c46ac580a9f4d822c909c113c6d |
|
BLAKE2b-256 | ff429e9be6cc73ad2120387a0e972df42ba89627c0739ced4776185399d50b3c |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp39-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp39-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 140.4 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df3e42c59b9bcd751a66240718102dd883972f211e49522704150123f7894e90 |
|
MD5 | 793366ecb785437219d7c460e375caf6 |
|
BLAKE2b-256 | 6e7442901e4128a6e64f4523a280d37f4a48f7b9078cfecff201cfbadba4231b |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp39-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp39-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 141.3 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92e42573038b077447b9cffef741ed43895acf5e215bd548089c08e89a1ed9dc |
|
MD5 | 4a1076dcbcb9f9eb301ea2cd64f5abf0 |
|
BLAKE2b-256 | fe3e713b4a4dd8febd0de7cc90869508827465691a98226e68328d6e011dc11e |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp38-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp38-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 145.5 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a07a52208de6fd849d050870901829160f1fdd1085e88c16b6205332185b1241 |
|
MD5 | fdf943102f63a8edb58713aa43cda707 |
|
BLAKE2b-256 | be0dde676ba739df4eae23ded81ee6864359af650fc2cc740af1e615c46c11a6 |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp38-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp38-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 147.3 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23a3d43213d90af24570a8ce4b46c6450be397bd98d15343cacbd2155e1e738c |
|
MD5 | 315d935590742ff8ecdd45261b24b632 |
|
BLAKE2b-256 | 1d8d40dd869d000ae6a5cec190a34c3ece24886f1a03859d7f8b2a98ee49bafc |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp37-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp37-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 133.2 kB
- Tags: CPython 3.7, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67abb620541e0cb8c43b5d91b11802420d7d29e70c482a324b229806df91c430 |
|
MD5 | 1367df24e2167f1a7d515058ee1c64e0 |
|
BLAKE2b-256 | d6b0d75fe65a598f7311106c99e53d629186b2d54ae19f64bea3fdf9608df50f |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp37-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp37-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 134.5 kB
- Tags: CPython 3.7, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c1c9e64e713dfdd3d3c63f2b72983f5a8832baf079777989350a45cf0204311 |
|
MD5 | c338f8c078140bbda7ecf1a0dc227327 |
|
BLAKE2b-256 | 881fee75219e584bd4eea8007f0f22322ad4d761eff67c4abaf536919a6b2d26 |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp36-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp36-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 130.9 kB
- Tags: CPython 3.6, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d3b8e5ce5738eb446a1b3271d42b322d78c8ded77d3da6e72502a520aa8c182 |
|
MD5 | 668f97d60158fbf4285e2d551302bfbb |
|
BLAKE2b-256 | 1ac64d2dc030416f86d6e46efd4bdcfe67a4f6371aa4a932b462d52573ff4f1e |
File details
Details for the file mlsteam_model_sdk-0.4.1-cp36-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mlsteam_model_sdk-0.4.1-cp36-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 132.2 kB
- Tags: CPython 3.6, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff1a23386d15534ca18bd786acc20c8ee65e14b0a3a9c7a8368d252ed2e58813 |
|
MD5 | 08886aea5a865a3437c8de3c73874042 |
|
BLAKE2b-256 | 5c405c93d1620f3770cbd88007944711d1b29a711b0370c2d103adfbafddfc82 |