【问题标题】:GCP not detecting correct python version when submitting ML training job提交 ML 训练作业时 GCP 未检测到正确的 python 版本
【发布时间】:2021-11-14 14:54:48
【问题描述】:

我正在尝试使用以下方法在 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 支持的版本。

我该如何解决这个问题?

【问题讨论】:

    标签: python machine-learning google-cloud-platform tpu


    【解决方案1】:

    此错误与 TensorFlow 版本 2.6 有关。您可以看到以下选项:

    • Doesn’t support batch prediction。你可以使用versions 1.15 or 2.1

    • 使用比支持的最新版本更新的 TensorFlow AI Platform Training 上的运行时版本可用于训练,但 不用于预测。

      使用尚不支持作为完整 AI 的 TensorFlow 版本 Platform Training 运行时版本,将其作为自定义依赖项包含在内 使用以下方法之一为您的培训师提供:

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

    REQUIRED_PACKAGES = ['tensorflow>=2.6]

    你可以看到更多documentation

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

    --runtime-version 1.9

    您可以查看有关 supported version 的更多文档。

    【讨论】:

      猜你喜欢
      • 2017-03-09
      • 1970-01-01
      • 2020-02-20
      • 2019-07-13
      • 2018-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-25
      相关资源
      最近更新 更多