class mlflow.models.Model(artifact_path=None, run_id=None, utc_time_created=datetime.datetime(2018, 7, 18, 18, 30, 0, 13810), flavors=None)

Bases: object

A servable MLflow model, which can support multiple model flavors.

add_flavor(name, **params)

Add an entry for how to serve the model in a given format.

classmethod load(path)

Load a Servable from its YAML representation.

classmethod log(artifact_path, flavor, **kwargs)

Log model using supplied flavor module.

  • artifact_path – Run-relative path identifying this model.
  • flavor – Flavor module / object to save the model with. The module / object must have save_model function which will persist the model as a valid MLflow model.
  • kwargs – Extra args passed to the model flavor.

Write this Servable as a YAML file to a local file.