mlflow.keras

MLflow integration for Keras.

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

Load a Keras model from a local file (if run_id is None) or a run.

mlflow.keras.load_pyfunc(model_file)

Loads a Keras model as a PyFunc from the passed-in persisted Keras model file.

Parameters:model_file – Path to Keras model file.
Returns:PyFunc model.
mlflow.keras.log_model(keras_model, artifact_path, **kwargs)

Log a Keras model as an MLflow artifact for the current run.

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

Save a Keras model to a path on the local file system.

Parameters:
  • keras_model – Keras model to be saved.
  • path – Local path where the model is to be saved.
  • mlflow_model – MLflow model config this flavor is being added to.