首页 > 解决方案 > MLflow 将工件存储在 GCP 存储桶上,但无法读取它们

问题描述

我在这里发现了一个几乎相同的问题,但没有足够的声誉来添加评论,所以会再次询问,希望有人同时找到解决方案。

我正在使用 MLflow (1.13.1) 来跟踪模型性能和 GCP 存储来存储模型工件。MLflow 在 GCP VM 实例上运行,我的 python 应用程序使用具有 Storage Object Creator 和 Storage Object Viewer 角色的服务帐户(然后我还添加了 storage.buckets.get 权限)将工件存储在 GCP 存储桶中并从中读取. 一切都按预期工作,参数和指标正确显示在 MLflow UI 中,模型工件正确存储在存储桶中。问题是模型工件没有显示在 MLflow UI 中,因为这个错误:

Unable to list artifacts stored under gs:/******/artifacts for the current run. 
Please contact your tracking server administrator to notify them of this error, 
which can happen when the tracking server lacks permission to list artifacts under the current run's root artifact directory.

引用的工件位置存在并包含正确的模型工件,并且由于 Storage Object Viewer 角色和 storage.buckets.get 权限,MLflow 应该能够读取工件。

关于什么可能是错的任何建议?谢谢你。

标签: google-cloud-platformmlflow

解决方案


我在发布问题后发现了问题。我忘记google-cloud-storage在 GCP VM 上安装库。现在一切都按预期工作。


推荐阅读