Skip to main content

PyPI - Version

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.

Duration Results Iteration Results

[!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!

Metadata

Release files for mlflow-go-backend 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for mlflow-go-backend 0.2.2
File
mlflow_go_backend-0.2.2-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
mlflow_go_backend-0.2.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
mlflow_go_backend-0.2.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
mlflow_go_backend-0.2.2-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details

Total release size: 49.3 MB

Release files / mlflow_go_backend-0.2.2-py3-none-win_arm64.whl

Download URL mlflow_go_backend-0.2.2-py3-none-win_arm64.whl
Size 7.1 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
c7c4c469229864bf041dc446fcf1c878ebcf73712392762ef74181fd7bfa2078
BLAKE2b-256 checksum
How to use checksums
a0cf7214f1989916479c728176cf69f382d58c9a519b7ccc95ee6183ad1a203e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mlflow_go_backend-0.2.2-py3-none-win_amd64.whl

Download URL mlflow_go_backend-0.2.2-py3-none-win_amd64.whl
Size 7.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
cda07bf723554f13508e2042ffb3965d4fcbf8202f74b216245d1c43e61b9f58
BLAKE2b-256 checksum
How to use checksums
96b75ae0ab1606bde891037e3a780f0462d527c6378eacca74b2837a226cb67d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
49b014275d6310b926212e5c00f2e4a8f52d1b6e174ead7ffa2b57bf929f15bf
BLAKE2b-256 checksum
How to use checksums
08b05022e418b733a11992dc86b2338c0d495c5f9a4d04f9ef8cb0d9d47ba134
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mlflow_go_backend-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 9.6 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d0131a8b2efcd41174042be1ef2b7149598352a1de7ea3c303810c064ad87b24
BLAKE2b-256 checksum
How to use checksums
f59d842040a9efe4c4afe5dd3a76a71866eb3e2d8b32f06d56b079d10390ce02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mlflow_go_backend-0.2.2-py3-none-macosx_11_0_arm64.whl

Download URL mlflow_go_backend-0.2.2-py3-none-macosx_11_0_arm64.whl
Size 7.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b4a0dbc780e70532c1966865e5359f1e782e3a459fb2e14330bb3dc4aeb635e7
BLAKE2b-256 checksum
How to use checksums
29edf152c400c27be8d71599859612eb1f96ef41e1727adeea2391bf41c0e9fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mlflow_go_backend-0.2.2-py3-none-macosx_10_13_x86_64.whl

Download URL mlflow_go_backend-0.2.2-py3-none-macosx_10_13_x86_64.whl
Size 7.6 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
7536a686a43b3c6e87ffd85de53d71e5d5512bff890965afccaea94aeccfdc2e
BLAKE2b-256 checksum
How to use checksums
fc5b6b507b4d63d8bd3aa3038367eb286bd0874d3f9f970a6fb2df693d71e6c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.2.2 This release

6 release files

0.2.0

6 release files

0.1.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page