mlflow.load_mlflow_metrics

mlflow.load_mlflow_metrics(runs, *, keys=None, x='step', tracking_uri=None)

Read the metrics MLflow runs logged.

Parameters

Name Type Description Default
runs str, mlflow.entities.Run, pandas.DataFrame, or iterable of these The runs: a run id, a run MlflowClient.get_run() or search_runs() returned, the DataFrame mlflow.search_runs() returns, or an iterable of ids and runs. required
keys iterable of str Only these metrics, in this order. By default every metric a run logged, sorted, leaving out MLflow’s system/ metrics. A metric that no run logged is warned about. None
x ('step', 'relative_time') What places a value along the x axis: the step it was logged at, or the seconds from the start of its run, as the MLflow UI offers. "step"
tracking_uri str The tracking server to read from. By default MLflow’s own, as mlflow.set_tracking_uri or MLFLOW_TRACKING_URI set it. None

Returns

Name Type Description
dict of str to dict of str to MetricSeries Metric by metric, and within a metric run by run, in the order the runs were given. A run that logged nothing under a metric is absent.

Raises

Name Type Description
ImportError If mlflow is not installed.
ValueError If x is neither "step" nor "relative_time".