gpt4 book ai didi

tensorflow - 做 Tensorflow 教程时出错

转载 作者:行者123 更新时间:2023-12-02 02:58:57 25 4
gpt4 key购买 nike

我关注这个tutorial在谷歌云机器学习引擎上进行培训。我一步一步地跟着它,但是在将 ml 作业提交到云时我遇到了错误。我运行了这个命令。

sam@sam-VirtualBox:~/models/research$ gcloud ml-engine jobs submit training whoami_object_detection_date +%s --job-dir=gs://tf_testing/train --packages dist/object_detection-0.1.tar.gz,slim/dist/slim-0.1.tar.gz --module-name object_detection.train --region us-central1 --config object_detection/samples/cloud/cloud.yml -- --train_dir=gs://tf_testing/train --pipeline_config_path=gs://tf_testing/data/faster_rcnn_resnet101_pets.config

我得到了这个错误。

ERROR: (gcloud.ml-engine.jobs.submit.training) FAILED_PRECONDITION: Field: package_uris Error: The provided GCS paths [gs://tf_testing/train/packages/8ec87a281aadb58d3d82462bbffafa9d7e521cc03025209704bc643eb9f3bc37/slim-0.1.tar.gz, gs://tf_testing/train/packages/8ec87a281aadb58d3d82462bbffafa9d7e521cc03025209704bc643eb9f3bc37/object_detection-0.1.tar.gz] cannot be read by service account service-499049193648@cloud-ml.google.com.iam.gserviceaccount.com. - '@type': type.googleapis.com/google.rpc.BadRequest fieldViolations: - description: The provided GCS paths [gs://tf_testing/train/packages/8ec87a281aadb58d3d82462bbffafa9d7e521cc03025209704bc643eb9f3bc37/slim-0.1.tar.gz, gs://tf_testing/train/packages/8ec87a281aadb58d3d82462bbffafa9d7e521cc03025209704bc643eb9f3bc37/object_detection-0.1.tar.gz] cannot be read by service account service-499049193648@cloud-ml.google.com.iam.gserviceaccount.com. field: package_uris

我看到了这个postthis post并尝试了解决方案,但没有帮助。仅供引用,我在运行此命令时没有更改 PATH_TO_BE_CONFIGURED。会不会是这个原因?

sed -i "s|PATH_TO_BE_CONFIGURED|"gs://${YOUR_GCS_BUCKET}"/data|g" \ object_detection/samples/configs/faster_rcnn_resnet101_pets.config

最佳答案

您需要允许服务帐户读取/写入您的存储桶:

gsutil acl ch -u $SVCACCT:WRITE gs://$BUCKET/

gsutil defacl ch -u $SVCACCT:O gs://$BUCKET/

或者:

gcloud ml-engine 初始化项目

将服务帐户添加为项目的编辑者。确保在拥有存储桶的项目中执行此操作

关于tensorflow - 做 Tensorflow 教程时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47695766/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com