interpret_community.mlflow.mlflow module

interpret_community.mlflow.mlflow.get_explanation(run_id, name)

Download and deserialize an explanation that has been logged to MLflow.

Parameters
  • run_id (str) – The ID of the run the explanation was logged to.

  • name (str) – The name given to the explanation when it was logged.

Returns

The rehydrated explanation.

Return type

Explanation

interpret_community.mlflow.mlflow.log_explanation(name, explanation)

Log the explanation to MLflow using MLflow model logging.

Parameters
  • name (str) – The name of the explanation. Will be used as a directory name.

  • explanation (Explanation) – The explanation object to log.

interpret_community.mlflow.mlflow.save_model(path, loader_module=None, data_path=None, conda_env=None, mlflow_model=None, **kwargs)

Save the explanation locally using the MLflow model format.

This function is necessary for log_explanation to work properly.

Parameters
  • path (str) – The destination path for the saved explanation.

  • loader_module (str) – The package that will be used to reload a serialized explanation. In this case, always interpret_community.mlflow.

  • data_path (str) – The path to the serialized explanation files.

  • conda_env (str) – The path to a YAML file with basic Python environment information.

  • mlflow_model (None) – In our case, always None.

Returns

The MLflow model representation of the explanation.

Return type

mlflow.models.Model