Version and deploy your models following GitOps principles
Project description
MLEM helps you with model deployment. It saves ML models in a standard format that can be used in a variety of downstream deployment scenarios such as real-time serving through a REST API or batch processing. MLEM format is a human-readable text that helps you use GitOps with Git as the single source of truth.
- Run your model anywhere you want: package it as a Python package, a Docker Image or deploy it to Heroku (SageMaker, Kubernetes and more platforms are coming). Switch between formats and deployment platforms with a single command thanks to unified abstraction.
- Simple text file to save model metadata: automatically package Python env requirements and input data specifications into a ready-to-deploy format. Use the same human-readable format for any ML framework.
- Stick to your training workflow: MLEM doesn't ask you to rewrite your training code. To start using packaging or deployment machinery, add just two lines to your python script: one to import the library and one to save the model.
- Developer-first experience: use CLI when you feel like DevOps and API when you feel like a developer.
Why MLEM?
The main reason to use MLEM instead of other related solutions is that it works well with GitOps approach and helps you manage model lifecycle in Git:
- Git as a single source of truth: we use plain text to save metadata for models that can be saved and versioned.
- Reuse existing Git and Github/Gitlab infrastructure for model management instead of installing separate model management software.
- Unify model and software deployment. Deploy models using the same processes and code you use to deploy software.
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.13.tar.gz
.
File metadata
- Download URL: mlem-0.1.13.tar.gz
- Upload date:
- Size: 154.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 185c04512e4b814ff8f98c8ae93583e659cb29a1e00f1cad9ba00b4c2fc8d3ec |
|
MD5 | 815ec06cec0bd2cbe8f4d733ab474d93 |
|
BLAKE2b-256 | 2eb265078a055b361f11b3af78178914404c8f2f6517744575fcb1ed1383c070 |
File details
Details for the file mlem-0.1.13-py3-none-any.whl
.
File metadata
- Download URL: mlem-0.1.13-py3-none-any.whl
- Upload date:
- Size: 128.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be937ea82b7c7a1f7acf13ddd49339b1dbd6143dd94aae8151de462b09b0ed1 |
|
MD5 | d9ac601b01ea41b8cd786f17cf575368 |
|
BLAKE2b-256 | 28585bd534b14c6fdc019acba48cc201a1d25319ecaf84ec88f69ad423c57d3a |