MLflow integration for SciKit-Learn.

mlflow.sklearn.load_model(path, run_id=None)

Load a SciKit-Learn model from a local file (if run_id is None) or a run.

mlflow.sklearn.log_model(sk_model, artifact_path)

Log a SciKit-Learn model as an MLflow artifact for the current run.

mlflow.sklearn.save_model(sk_model, path, conda_env=None, mlflow_model=<mlflow.models.Model object>)

Save a SciKit-Learn model to a path on the local file system.

  • sk_model – Scikit-Learn model to be saved.
  • path – Local path where the model is to be saved.
  • conda_env – Path to a Conda environment file. If provided, this decribes the environment this model should be run it. At minimum, it should specify python, sklearn and mlflow with appropriate versions.
  • mlflow_model – MLflow model config this flavor is being added to.