Skip to main content

Overview

The dbnd-mlflow plugin allows storing mlflow metrics to DBND tracker together with duplicating them to the mlflow store.

Install

pip install dbnd-mlflow
# or
pip install databand[mlflow]

Config

[core]
# Databand store url should be defined
databand_url=http://localhost:8080

[mlflow_tracking]
# Enable tracking to Databand store
databand_tracking=True

# Optionally, define a URI for mlflow store,
# mlflow.get_tracking_uri() is used by default
; duplicate_tracking_to=http://mlflow-store/

Run example

You might need to install examples at first pip install dbnd-examples.

dbnd run dbnd_examples.tracking.tracking_mlflow.task_with_mflow

# or set configs manually
dbnd run dbnd_examples.tracking.tracking_mlflow.task_with_mflow --set-config mlflow_tracking.databand_tracking=True

Explanation

mlflow_example code

from dbnd import task
from mlflow import start_run, end_run
from mlflow import log_metric, log_param

@task
def mlflow_example():
    start_run()
    # params
    log_param("param1", randint(0, 100))
    log_param("param2", randint(0, 100))
    # metrics
    log_metric("foo1", random())
    log_metric("foo2", random())
    end_run()

Execution flow:

  1. Run dbnd run mlflow_example --set-config mlflow_tracking.databand_tracking=True
  2. dbnd creates a new dbnd context
  3. dbnd_on_pre_init_context hook from dbnd_mlflow is triggered
    • a new uri is computed to be used by mlflow, e.g.:
      • dbnd://localhost:8080?duplicate_tracking_to=http%253A%252F%252Fmlflow-store%253A80%252F
    • the new uri is set to be used with mlflow.set_tracking_uri()
  4. mlflow_example task starts:
    1. mlflow.start_run()
      1. mlflow reads entry_points for each installed package and finds:
        • "dbnd = dbnd_mlflow.tracking_store:get_dbnd_store",
        • "dbnd+s = dbnd_mlflow.tracking_store:get_dbnd_store",
        • "databand = dbnd_mlflow.tracking_store:get_dbnd_store",
        • "databand+s = dbnd_mlflow.tracking_store:get_dbnd_store",
      2. mlflow creates TrackingStoreClient using the new uri
      3. uri schema instructs to use dbnd_mlflow.tracking_store:get_dbnd_store
        • get_dbnd_store creates dbnd TrackingAPIClient
        • get_dbnd_store creates mlflow tracking store to duplicate tracking to
        • get_dbnd_store returns DatabandStore instance
    2. log_param()/log_metric()
      • calls to DatabandStore
        • calls to TrackingAPIClient
        • calls to mlflow tracking store to duplicate tracking to
    3. mlflow.end_run()
  5. mlflow_example ends
  6. dbnd_on_exit_context hook from dbnd_mlflow is triggered
    • restore original mlflow tracking uri

Metadata

Release files for dbnd-mlflow 1.0.34.1

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

Source distribution (sdist)

Source distribution for dbnd-mlflow 1.0.34.1
File Size Uploaded Provenance Actions
dbnd_mlflow-1.0.34.1.tar.gz 12.4 kB Without provenance Details for dbnd_mlflow-1.0.34.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dbnd-mlflow 1.0.34.1
File Interpreter ABI Platform Actions
dbnd_mlflow-1.0.34.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for dbnd_mlflow-1.0.34.1-py2.py3-none-any.whl

Total release size: 25.2 kB

Release files / dbnd_mlflow-1.0.34.1.tar.gz

Download URL dbnd_mlflow-1.0.34.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
68a32f10543cf3122073008c6dc3e384817fb8e43263c91f916d17a3cdd841ce
BLAKE2b-256 checksum
How to use checksums
759dfbf2a95bfee3188038fd9f4cb40342a36a3a7938b64b16be30b4bc42b7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.9

Release files / dbnd_mlflow-1.0.34.1-py2.py3-none-any.whl

Download URL dbnd_mlflow-1.0.34.1-py2.py3-none-any.whl
Size 12.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
47dc6f26076368dfd7d2b7dadfd912e0303ca19ce4635ff8377ec01e0ba31ddd
BLAKE2b-256 checksum
How to use checksums
03383eaa52fbdff505da6fb583c48b2553634d683fd3109c1223cf1512f45f99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.9

Security for dbnd-mlflow 1.0.34.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.34.1 This release

2 release files No provenance

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