[英]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.