在过去的几天里,我一直在使用带有TPU的Colab,它非常棒。现在,我想升级到GCE上的付费TPU。我一直在跟踪快速启动:https://cloud.google.com/tpu/docs/quickstart
我使用TPU up创建了一个存储桶和一个tpu。现在,我想用我的笔记本连接到TPU,笔记本电脑由GCP AI笔记本(https://console.cloud.google.com/ai-platform/notebooks)托管。当我在科拉布的时候,我可以通过以下方式访问它:
cluster_resolver = tf.distribute.cluster_resolver.TPUClusterResolver()
tf.config.experimental_connect_to_cluster(cluster_resolver)当我在GCP AI笔记本上运行同一行时.
cluster_resolver = tf.distribute.cluster_resolver.TPUClusterResolver('MyTPUName')
tf.config.experimental_connect_to_cluster(cluster_resolver)...it抛出此错误
HttpError: <HttpError 403 when requesting https://tpu.googleapis.com/v1/projects/local-dialect-[MyProjectID]/locations/us-east1-c/nodes/[MyTPUName]?alt=json returned "Location us-east1-c is not found or access is unauthorized.">我该怎么解决呢?顺便说一句,如果有人从谷歌读到这样的信息:如果你要为这个产品收取每小时1.5美元的费用,那么从Colab那里拿一个“升级”按钮怎么样?每个人都赢。
谢谢!
发布于 2020-01-16 01:49:51
结果我需要一些额外的参数来通过安全。这样做是有效的:
cluster_resolver = tf.distribute.cluster_resolver.TPUClusterResolver( \
tpu='[my tpu name]',
zone='us-central1-a',
project='[my project name]')
tf.config.experimental_connect_to_cluster(cluster_resolver)https://stackoverflow.com/questions/59741414
复制相似问题