【问题标题】:Using TPU on Cloud ML Engine在 Cloud ML Engine 上使用 TPU
【发布时间】:2019-01-17 00:47:50
【问题描述】:

我正在尝试在 Cloud ML Engine 上使用 TPU,但我不知道应该如何提供 TPUClusterResolver 期望的 tpu 参数。

这是我正在使用的环境:

--python-version 3.5 \
--runtime-version 1.12 \
--region us-central1 \
--scale-tier BASIC_TPU

作业崩溃:

ValueError: Please provide a TPU Name to connect to.

作为一个单独的问题 - ML 引擎似乎将--master grpc://10.129.152.2:8470 自己添加到我的工作中,这也使工作崩溃。作为一种解决方法,我只是在我的代码中添加了一个未使用的主标志。

【问题讨论】:

  • 生成了一个master-replica-0 Running task with arguments: --cluster... --tpu_node={"project": "nd1a3f7fc7f45c50c-ml", "zone": "us-central1-c", "tpu_node_name": "cmle-training-18374866318486238002-tpu"} 日志。我猜tpu_node_name 需要以某种方式传递给TPUClusterResolver
  • 您使用的是哪个样本?请查看此工作示例:github.com/GoogleCloudPlatform/cloudml-samples/tree/master/tpu
  • 我使用的是来自github.com/tensorflow/tpu/tree/master/models/experimental/… 的初始样本。我刚刚尝试了来自 github.com/GoogleCloudPlatform/cloudml-samples/tree/master/tpu 的 resnet 示例。这很好用。我能够将其用作模板并更新初始代码以使其正常工作。谢谢指点!

标签: tensorflow google-cloud-ml tpu


【解决方案1】:

这是运行时 1.11 和 1.12 的已知问题,现已修复。现在,该服务不会将 --master 附加到您的训练应用程序中。你应该继续使用TpuClusterResolver

【讨论】:

    猜你喜欢
    • 2018-06-06
    • 1970-01-01
    • 2017-02-24
    • 2017-09-05
    • 2023-03-20
    • 2018-06-23
    • 1970-01-01
    • 2018-03-24
    • 1970-01-01
    相关资源
    最近更新 更多