简体   繁体   English

在 GCS 存储桶上记录来自 MlFlow 的工件

[英]Logging Artifacts from MlFlow on GCS Bucket

I have a running MlFlow server on GCS VM instance.我在 GCS VM 实例上有一个正在运行的 MlFlow 服务器。 I have created a bucket to log the artifacts.我创建了一个存储桶来记录工件。 This is the command I'm running to start the server and for specifying bucket path-这是我正在运行以启动服务器并指定存储桶路径的命令-

mlflow server --default-artifact-root gs://gcs_bucket/artifacts --host x.x.x.x

But facing this error:但是面对这个错误:

TypeError: stat: path should be string, bytes, os.PathLike or integer, not ElasticNet

Note- The mlflow server is running fine with the specified host alone.注意 - mlflow 服务器单独使用指定的主机运行良好。 The problem is in the way when I'm specifying the storage bucket path.问题出在我指定存储桶路径时的方式。 I have given permission of storage api by using these commands:我已使用以下命令授予存储 api 的权限:

gcloud auth application-default login
gcloud auth login

Also, on printing the artifact URI, this is what I'm getting:此外,在打印工件 URI 时,这就是我得到的:

mlflow.get_artifact_uri()

Output: Output:

gs://gcs_bucket/artifacts/0/122481bf990xxxxxxxxxxxxxxxxxxxxx/artifacts

So in the above path from where this is coming 0/122481bf990xxxxxxxxxxxxxxxxxxxxx/artifacts and why it's not getting auto-created at gs://gcs_bucket/artifacts所以在上面的路径中,这是从哪里来的0/122481bf990xxxxxxxxxxxxxxxxxxxxx/artifacts以及为什么它没有在gs://gcs_bucket/artifacts自动创建

After debugging more, why it's not able to get the local path from VM:经过更多调试,为什么无法从VM获取本地路径: 在此处输入图像描述

And this error I'm getting on VM:我在VM上遇到了这个错误:

ARNING:root:Malformed experiment 'mlruns'. Detailed error Yaml file './mlruns/mlruns/meta.yaml' does not exist.
Traceback (most recent call last):
 File "/usr/local/lib/python3.6/dist-packages/mlflow/store/tracking/file_store.py", line 197, in list_experiments
   experiment = self._get_experiment(exp_id, view_type)
 File "/usr/local/lib/python3.6/dist-packages/mlflow/store/tracking/file_store.py", line 256, in _get_experiment
   meta = read_yaml(experiment_dir, FileStore.META_DATA_FILE_NAME)
 File "/usr/local/lib/python3.6/dist-packages/mlflow/utils/file_utils.py", line 160, in read_yaml
   raise MissingConfigException("Yaml file '%s' does not exist." % file_path)
mlflow.exceptions.MissingConfigException: Yaml file './mlruns/mlruns/meta.yaml' does not exist.

Can I get a solution to this and what I'm missing?我可以找到解决方案以及我所缺少的吗?

I think the main error is from the structure that you want to deploy.我认为主要错误来自您要部署的结构。 For your use case, the structure is suitable that in here .对于您的用例, 这里的结构适合。 So you miss the URI path which used to store backend metadata.所以你错过了用于存储后端元数据的 URI 路径。 So please install DB SQL(postgres,...) first, then add path to --backend-storage-uri.所以请先安装 DB SQL(postgres,...),然后添加 --backend-storage-uri 的路径。

In case you just want to use MlFlow like a model registries and store images on gcs.如果您只想使用 MlFlow,例如 model 注册表并将图像存储在 gcs 上。 You can use this structure in here你可以在这里使用这个结构

Hope this can help you.希望这可以帮到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 GCS 存储桶中的文件夹中删除数百万个对象 - Delete millions of objects from a folder in GCS bucket 如何从 gcs 存储桶中解压缩 tsv 文件并将其加载到 Bigquery - How to unzip and load tsv file into Bigquery from gcs bucket 在同一项目中列出 Cloud Function 中的 GCS 存储桶 blob - Listing GCS bucket blobs from Cloud Function in the same project Airflow 将最新文件从 GCS 存储桶复制到本地 - Airflow to copy most recent file from GCS bucket to local 将文件从 Power Automate 流上传到 GCS 存储桶 - Upload a file from a Power Automate flow into a GCS bucket 如何将 FPDF output 从 python 发送到 GCS 桶? - How to send FPDF output to GCS bucket from python? 修改 GCS bucket 中的 JSON 文件,将字段的数据类型从 String 更改为 Array (GCP) - Modify JSON files in GCS bucket to change the datatype of a field from String to Array (GCP) 仅列出 Cloud Function 存储桶 API 中 GCP GCS 中的顶级文件夹? - List only top level folders in GCP GCS from Cloud Function bucket API? 如何将特定日期创建的所有文件从一个存储桶复制到 GCS 中的另一个存储桶? - How to copy all the files created on a specific date from one bucket to another in GCS? Url 使用 Java 从 GCS 存储桶下载文件后仍然可以访问 - Url to download file from GCS bucket still accessible after deleting using Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM