GCP在提交ML培训作业时未检测到正确的python版本



我正试图使用以下内容提交GCP上的TPU ML培训作业:

> !gcloud ai-platform jobs submit training `whoami`_object_detection_`date +%s` 
> --job-dir=gs://dota-1/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 2.6 
> --scale-tier BASIC_TPU 
> --region us-central1 
> -- 
> --model_dir=gs://dota-1/train 
> --tpu_zone us-central1 
> --python-version 3.7 
> --pipeline_config_path=gs://dota-1/data/pipeline.config

但它给了我以下错误,并且没有检测到正确的python版本:

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

我已经运行了!python --version,并确认我安装了python 3.7,这是GCP支持的版本。

我该怎么解决这个问题?

此错误与TensorFlow 2.6版本有关。你可以看到这些选项:

  • 不支持批量预测。您可以使用1.15版本或2.1。

  • 使用比支持的最新版本更新的TensorFlow人工智能平台训练的运行时版本可以用于训练,但不是为了预测。

    使用尚未作为完整AI支持的TensorFlow版本Platform Training运行时版本,将其作为自定义依赖项包含使用以下方法之一:

    将setup.py文件中的TensorFlow版本指定为PyPI依赖性。将其包含在您的所需包裹列表中,如下所示:

REQUED_PACKAGES=['sensorflow>=2.6]

您可以查看更多文档。

  • 更改编辑此标志的运行时版本,但您必须已安装程序包:

-运行时版本1.9

您可以查看有关支持版本的更多文档。

最新更新