访问 MLflow 试验项目时出现 OSError 错误OSError when accessing MLflow experiment artifacts

问题Problem

尝试使用以下某项下载或记录项目时收到 OSError: No such file or directory 错误消息:You get an OSError: No such file or directory error message when trying to download or log artifacts using one of the following:

  • MlflowClient.download_artifacts()
  • mlflow.[flavor].log_model()
  • mlflow.[flavor].load_model()
  • mlflow.log_artifacts()
OSError: No such file or directory: '/dbfs/databricks/mlflow-tracking/<experiment-id>/<run-id>/artifacts/...'

原因Cause

你的 MLflow 客户端已过期。Your MLflow client is out of date.

MLflow 的早期版本不提供对 dbfs:/databricks/mlflow-tracking/ 中存储的项目的支持。Older versions of MLflow do not provide support for artifacts stored in dbfs:/databricks/mlflow-tracking/.

解决方案Solution

请升级到 MLflow 版本1.9.1 或更高版本,然后重试。Upgrade to MLflow version 1.9.1 or higher and try again.

%sh
pip install --upgrade mlflow