mlflow.models
The mlflow.models module provides an API for saving machine learning models in
“flavors” that can be understood by different downstream tools.
The built-in flavors are:
For details, see MLflow Models.
-
class
mlflow.models.Model(artifact_path=None, run_id=None, utc_time_created=datetime.datetime(2018, 9, 27, 19, 34, 43, 76848), flavors=None) Bases:
objectAn MLflow Model that can support multiple model flavors.
-
classmethod
log(artifact_path, flavor, **kwargs) Log model using supplied flavor module.
Parameters: - artifact_path – Run relative path identifying the model.
- flavor – Flavor module to save the model with. The module must have
the
save_modelfunction that will persist the model as a valid MLflow model. - kwargs – Extra args passed to the model flavor.
-
classmethod