uv.mlflow package

Submodules

uv.mlflow.reporter module

MLFlow reporter that conforms to UV’s reporter interface.

class uv.mlflow.reporter.MLFlowPubsubReporter(project: Optional[str] = None, topic: Optional[str] = None)[source]

Bases: uv.reporter.base.AbstractReporter

Reporter implementation that logs metrics to mlflow using gcp pubsub.

Args:

project: gcp project for pubsub, defaults to UV_MLFLOW_PUBSUB_PROJECT

env var

topic: pubsub topic, defaults to UV_MLFLOW_PUBSUB_TOPIC env var

report(step: int, k: str, v: Any)None[source]

Accepts a step (an ordered int referencing some timestep), a metric key and a value, and persists the metric into some underlying store.

report_all(step: int, m: Dict[str, Any])None[source]

Accepts a step (an ordered int referencing some timestep) and a dictionary of metric key => metric value, and persists the metric into some underlying store.

Extending classes are expected to perform some side effect that’s either visually useful, as in a live-plot, or recoverable via some matching extension of AbstractReader.

report_param(k: str, v: str)None[source]

Accepts a key and value parameter and logs these as parameters alongside the reported metrics.

report_params(m: Dict[str, str])None[source]

Accepts a dict of parameter name -> value, and logs these as parameters alongside the reported metrics.

class uv.mlflow.reporter.MLFlowReporter[source]

Bases: uv.reporter.base.AbstractReporter

Reporter implementation that logs metrics to mlflow.

report(step: int, k: str, v: Any)None[source]

Accepts a step (an ordered int referencing some timestep), a metric key and a value, and persists the metric into some underlying store.

report_all(step: int, m: Dict[str, Any])None[source]

Accepts a step (an ordered int referencing some timestep) and a dictionary of metric key => metric value, and persists the metric into some underlying store.

Extending classes are expected to perform some side effect that’s either visually useful, as in a live-plot, or recoverable via some matching extension of AbstractReader.

report_param(k: str, v: str)None[source]

Accepts a key and value parameter and logs these as parameters alongside the reported metrics.

report_params(m: Dict[str, Union[str, Dict]])None[source]

Accepts a dict of parameter name -> value, and logs these as parameters alongside the reported metrics.

uv.mlflow.reporter.sanitize_key(k: str)str[source]

sanitizes keys for mlflow to conform to mlflow restrictions

Module contents