Version and deploy your models following GitOps principles
Project description
MLEM is in early alpha. Thank you for trying it out! 👋
Alpha include model registry functionality, and upcoming Beta will add model deployment functionality.
What is MLEM 🐶
MLEM is a tool to help you version and deploy your Machine Learning models. At the top level, MLEM consists of two parts:
- Model registry part:
- Storing model along with information required to use it: environment, methods, input data schema.
- Turning your Git repo into a model registry.
- Deployment part:
- Packing a model to use in any serving scenario.
- Provider-agnostic deployment.
Speaking generally, the goal of MLEM is to enable easy and error-safe way to transition ML model from training to serving environment.
Key features
- MLEM is not intrusive. It doesn't ask you to rewrite your training code. Just add two lines to your python script: one to import the library and one to save the model.
- MLEM turns your Git repository into an easy-to-use model registry. Have a centralized place to store your models along with all metainformation. You don't need to set up a separate backend server to use it as a model registry.
- Stick to your workflow. Use Gitflow or any other Git workflow you like. Because MLEM models are saved as mere artifacts, treat them as any other artifact your produce. Commit metainformation to your repo and store model binaries in any other way you usually do.
- Use your model whatever your like:
- Turn your model to a python package with one command. You find that helpful if you use your model embedded in some other Python application.
- Use your model for batch scoring. You can use MLEM CLI to get predictions for a data file or folder with files. The docker container you build will be capable of this by default.
- Turn your model to a REST API application with Dockerfile prepared with one command. If you like, treat it as a separate git repo or build a Docker container from a model directly.
- Deploy your model. MLEM is a provider-agnostic deployment tool. You don't have to learn new providers when you deploy models to a different cloud or PaaS. MLEM abstracts that for you and simplifies the model deployment tasks. If your provider is not listed yet, you can write a simple plugin to work with MLEM or upvote the issue for creating one.
Installation
Install MLEM with pip:
$ pip install mlem
To install the development version, run:
$ pip install git+https://github.com/iterative/mlem
Anonymized Usage Analytics
To help us better understand how MLEM is used and improve it, MLEM captures and reports anonymized usage statistics. You will be notified the first time you run mlem init
.
What
MLEM's analytics record the following information per event:
- MLEM version (e.g.,
0.1.2+5fb5a3.mod
) and OS version (e.g.,MacOS 10.16
) - Command name and exception type (e.g.,
ls, ValueError
orget, MLEMRootNotFound
) - Country, city (e.g.,
RU, Moscow
) - A random user_id (generated with uuid)
Implementation
The code is viewable in analytics.py. They are done in a separate background process and fail fast to avoid delaying any execution. They will fail immediately and silently if you have no network connection.
MLEM's analytics are sent through Iterative's proxy to Google BigQuery over HTTPS.
Opting out
MLEM analytics help the entire community, so leaving it on is appreciated. However, if you want to opt out of MLEM's analytics, you can disable it via setting an environment variable MLEM_NO_ANALYTICS=true
or by adding no_analytics: true
to .mlem/config.yaml
This will disable it for the project. We'll add an option to opt out globally soon.
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 Distribution
Built Distribution
File details
Details for the file mlem-0.1.10.tar.gz
.
File metadata
- Download URL: mlem-0.1.10.tar.gz
- Upload date:
- Size: 88.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a768c5ac8fb6850bae05c4d240a2ebedcbbf7e13b09d789366c4494db6814196 |
|
MD5 | 73eecff4f714e69b264312bbb7af2c67 |
|
BLAKE2b-256 | 43b9c03bb792973ff4f627cc634717c0b1975416d5883f8a519ca2312a0f7526 |
File details
Details for the file mlem-0.1.10-py3-none-any.whl
.
File metadata
- Download URL: mlem-0.1.10-py3-none-any.whl
- Upload date:
- Size: 111.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eec11f8016219b44c9b5de1bc12a3591e7af970b820e400edc6abea9ad00922 |
|
MD5 | 3f86f7e1af4fe7abf0862e76f9592485 |
|
BLAKE2b-256 | 4f45415e0bcfdcdbb3859fa2a318782a3942224a8cd49abb231681e663441a58 |