MLflow is an open source platform for the complete machine learning lifecycle
Project description
Go backend for MLflow
In order to increase the performance of the tracking server and the various stores, we propose to rewrite the server and store implementation in Go.
Getting started
Installation
pip install mlflow-go-backend
CLI Usage
mlflow-go-backend is meant to be a drop-in-replacement for mlflow.
You can update your existing mlflow command with mlflow-go:
- mlflow server --backend-store-uri postgresql://postgres:postgres@localhost:5432/postgres
+ mlflow-go server --backend-store-uri postgresql://postgres:postgres@localhost:5432/postgres
Every existing setting of mlflow server can be passed to mlflow-go.
[!CAUTION] The Go implementation currently does not support file storage as a backend store. You must provide the --backend-store-uri argument pointing to a database.
Python Usage
import mlflow
import mlflow_go_backend
# Enable the Go client implementation (disabled by default)
mlflow_go_backend.enable_go()
# Set the tracking URI (you can also set it via the environment variable MLFLOW_TRACKING_URI)
# Currently only database URIs are supported
mlflow.set_tracking_uri("sqlite:///mlflow.db")
# Use MLflow as usual
mlflow.set_experiment("my-experiment")
with mlflow.start_run():
mlflow.log_param("param", 1)
mlflow.log_metric("metric", 2)
Python Store Usage
import logging
import mlflow
import mlflow_go_backend
# Enable debug logging
logging.basicConfig()
logging.getLogger('mlflow_go_backend').setLevel(logging.DEBUG)
# Enable the Go client implementation (disabled by default)
mlflow_go_backend.enable_go()
# Instantiate the tracking store with a database URI
tracking_store = mlflow.tracking._tracking_service.utils._get_store('sqlite:///mlflow.db')
# Call any tracking store method
tracking_store.get_experiment(0)
# Instantiate the model registry store with a database URI
model_registry_store = mlflow.tracking._model_registry.utils._get_store('sqlite:///mlflow.db')
# Call any model registry store method
model_registry_store.get_latest_versions("model")
Why bother?
For that sweet performance my friend!
Initial benchmarks show us that critical API calls are faster and Go can handle more concurrent requests.
[!NOTE] These were initial results and can perhaps still be more optimized.
See benchmarks for more information.
Contribution
Try it out!
We advocate this project as a drop-in replacement for mlflow.
Please give it a try, and let us know if anything isn't working for you!
We look forward to your feedback!
Missing Endpoints
Hey there! We need your help! This project is not yet a full port of the current tracking server. Not every endpoint in the REST API is implemented in Go. Those missing are redirected to the existing Python implementation. Please consider helping us out and implement a missing endpoint.
Not yet a Go wizard? We've collected some resources to learn Go. Trust us, it will be an enriching and fun experience!
Community
There is a dedicated Slack channel called #mlflow-go on the official mlflow Slack.
Shoot us a message if you have any questions!
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlflow_go_backend-0.2.2-py3-none-win_arm64.whl.
File metadata
- Download URL: mlflow_go_backend-0.2.2-py3-none-win_arm64.whl
- Upload date:
- Size: 7.1 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7c4c469229864bf041dc446fcf1c878ebcf73712392762ef74181fd7bfa2078
|
|
| MD5 |
c1ef5e4b40b22e999cfe7f66560fd6c0
|
|
| BLAKE2b-256 |
a0cf7214f1989916479c728176cf69f382d58c9a519b7ccc95ee6183ad1a203e
|
File details
Details for the file mlflow_go_backend-0.2.2-py3-none-win_amd64.whl.
File metadata
- Download URL: mlflow_go_backend-0.2.2-py3-none-win_amd64.whl
- Upload date:
- Size: 7.8 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cda07bf723554f13508e2042ffb3965d4fcbf8202f74b216245d1c43e61b9f58
|
|
| MD5 |
d15e97bcd51dedee7effca87bccb2042
|
|
| BLAKE2b-256 |
96b75ae0ab1606bde891037e3a780f0462d527c6378eacca74b2837a226cb67d
|
File details
Details for the file mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.9 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b014275d6310b926212e5c00f2e4a8f52d1b6e174ead7ffa2b57bf929f15bf
|
|
| MD5 |
eebc4e1771f654fd04dc894feafe165a
|
|
| BLAKE2b-256 |
08b05022e418b733a11992dc86b2338c0d495c5f9a4d04f9ef8cb0d9d47ba134
|
File details
Details for the file mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 9.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0131a8b2efcd41174042be1ef2b7149598352a1de7ea3c303810c064ad87b24
|
|
| MD5 |
f4c560699696017c3e634ece58d995ff
|
|
| BLAKE2b-256 |
f59d842040a9efe4c4afe5dd3a76a71866eb3e2d8b32f06d56b079d10390ce02
|
File details
Details for the file mlflow_go_backend-0.2.2-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: mlflow_go_backend-0.2.2-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 7.1 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4a0dbc780e70532c1966865e5359f1e782e3a459fb2e14330bb3dc4aeb635e7
|
|
| MD5 |
35b23f29b84da3f05ea2acb522c9aec1
|
|
| BLAKE2b-256 |
29edf152c400c27be8d71599859612eb1f96ef41e1727adeea2391bf41c0e9fc
|
File details
Details for the file mlflow_go_backend-0.2.2-py3-none-macosx_10_13_x86_64.whl.
File metadata
- Download URL: mlflow_go_backend-0.2.2-py3-none-macosx_10_13_x86_64.whl
- Upload date:
- Size: 7.6 MB
- Tags: Python 3, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7536a686a43b3c6e87ffd85de53d71e5d5512bff890965afccaea94aeccfdc2e
|
|
| MD5 |
f613cb2e12615540dd56b8628c9668af
|
|
| BLAKE2b-256 |
fc5b6b507b4d63d8bd3aa3038367eb286bd0874d3f9f970a6fb2df693d71e6c1
|