Extensions¶
Dataiku’s experiment tracking features extensions to the MLflow Python API.
Some of those extensions are allowing actions that can only be performed through the CLI in standard MLflow.
In order to interact with these extensions, you must first obtain a reference to the dataikuapi.dss.mlflow.DSSMLflowExtension
through dataikuapi.dss.project.DSSProject.get_mlflow_extension()
import dataiku
import mlflow
project = dataiku.api_client().get_default_project()
mlflow_extension = project.get_mlflow_extension()
You can then use the following methods:
list models and experiments:
dataikuapi.dss.mlflow.DSSMLflowExtension.list_models()
anddataikuapi.dss.mlflow.DSSMLflowExtension.list_experiments()
rename experiments:
dataikuapi.dss.mlflow.DSSMLflowExtension.rename_experiment()
restore experiments and runs:
dataikuapi.dss.mlflow.DSSMLflowExtension.restore_experiment()
anddataikuapi.dss.mlflow.DSSMLflowExtension.restore_run()
clear experiments marked for deletion (garbage collect):
dataikuapi.dss.mlflow.DSSMLflowExtension.garbage_collect()
Others are more DSS specific:
clean the runtime experiment db for a DSS project:
dataikuapi.dss.mlflow.DSSMLflowExtension.clean_experiment_tracking_db()
set the inference info of a run (to make scoring or evaluation of a model easier):
dataikuapi.dss.mlflow.DSSMLflowExtension.set_run_inference_info()
create a DSS dataset of the experiment tracking runs of a project:
dataikuapi.dss.mlflow.DSSMLflowExtension.create_experiment_tracking_dataset()
deploy a model from a run:
dataikuapi.dss.mlflow.DSSMLflowExtension.deploy_run_model()