dplutils.observer.mlflow.MlflowObserver#
- class dplutils.observer.mlflow.MlflowObserver(run=None, experiment=None, tracking_uri=None, **mlflow_kwargs)[source]#
Mlflow-based observer
MLflow is an ML experiment tracker with included explorer UI. See mlflow/mlflow for details.
- Parameters:
run – Existing mlflow run object to use for tracking. In this case it is assumed the tracking_uri is that set globally.
experiment – Name of experiment under which to create run (if run not supplied).
tracking_uri – tracking uri, e.g.
file://...ormlflow://, etc. See mlflow docs for details.mlflow_kwargs – In case an existing
supplied (run is not) – created, in which case mlflow_kwargs (excluding
experiment_id) will be passed to its instantiation, usingmlflow.MlflowClient.create_run.be (one will) – created, in which case mlflow_kwargs (excluding
experiment_id) will be passed to its instantiation, usingmlflow.MlflowClient.create_run.
Methods
__init__([run, experiment, tracking_uri])increment(name[, value])Increment a counter
observe(name, value, **kwargs)Observe a metric value
param(name, value, **kwargs)Record a run parameter
timer(name, **kwargs)Return a timer context manager recoding to this observer