ML引擎运行时版本和Python版本不受支持。

5

我正在尝试运行谷歌云ml-engine,按照这个教程操作,当执行以下命令时:

$ gcloud ml-engine jobs submit training `whoami`_object_detection_`date +%s` \ 
    --job-dir=gs://${YOUR_GCS_BUCKET}/train\
    --packages dist/object_detection-0.1.tar.gz,slim/dist/slim-0.1.tar.gz,/tmp/pycocotools/pycocotools-2.0.tar.gz\
    --module-name object_detection.model_tpu_main \
    --runtime-version 1.10\
    --scale-tier BASIC_TPU\
    --region us-central1\
    --
    --model_dir=gs://${YOUR_GCS_BUCKET}/train
    --tpu_zone us-central1
    --pipeline_config_path=gs://${YOUR_GCS_BUCKET}/data/pipeline.config 

回答我的命令:

  ERROR: (gcloud.ml-engine.jobs.submit.training) INVALID_ARGUMENT: Field: runtime_version Error: The specified runtime version '1.10' with the Python version '' is not supported for TPU training.  Please specify a different runtime version. See https://cloud.google.com/ml/docs/concepts/runtime-version-list for a list of supported versions
- '@type': type.googleapis.com/google.rpc.BadRequest
  fieldViolations:
  - description: The specified runtime version '1.10' with the Python version '' is
  not supported for TPU training.  Please specify a different runtime version.
  See https://cloud.google.com/ml/docs/concepts/runtime-version-list for a list
  of supported versions
field: runtime_version

由于未检测到Python的任何版本,我在命令行中添加了一个--config=config.yaml参数: config.yaml:
trainingInput:
  pythonVersion: "3.5"

但问题几乎没有改变:
...
 - description: The specified runtime version '1.10' with the Python version '3.5'
...

运行时版本列表指定运行时版本1.10与Python 3.5兼容,我尝试了不同的运行时环境/ Python版本,但我的命令一直失败。


1
看起来你正在尝试使用Cloud TPU。如果你查看Cloud TPU支持(Beta版),它说支持版本1.9 - jdehesa
3个回答

4

@jdehesa说得对,支持的版本是1.9。版本1.10 不支持 训练云TPU模型。要更改运行时版本,请编辑此标志:

--runtime-version 1.9

我在1.8版本中遇到了同样的问题,但1.9版本似乎运行良好,谢谢! - Jean Bouvattier
2
您可以在以下链接中查看支持TPU的CMLE运行时版本:https://cloud.google.com/ml-engine/docs/tensorflow/runtime-version-list#tpu-support。目前,唯一支持的版本是1.9。工程团队正在努力添加Tensorflow 1.11和1.12的TPU支持。 - lwz1992

2

虽然这个链接可能回答了问题,但最好在此处包含答案的基本部分并提供参考链接。仅有链接的答案如果链接页面发生更改可能会变得无效。 - Karl

0

即使确保所有版本兼容,我仍然遇到了同样的问题。

一旦我在gcloud训练命令中添加了这行代码(在运行时版本行下面),它就可以正常工作了。

--python-version 3.7 \

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接