Python 3.x GCP中的训练对象检测终止于:TypeError:应为二进制或unicode字符串,无

Python 3.x GCP中的训练对象检测终止于:TypeError:应为二进制或unicode字符串,无,python-3.x,tensorflow,machine-learning,google-cloud-platform,Python 3.x,Tensorflow,Machine Learning,Google Cloud Platform,我们正试图提交一份关于GCP的培训工作。我跟着宠物教程走了很远,但现在我有点卡住了,希望有人能给我指出正确的方向 我们将通过以下命令开始培训工作: gcloud ml-engine jobs submit training `whoami`_object_detection_`date +%s` \ --job-dir=${YOUR_GCS_BUCKET}/train \ --packages dist/object_detection-0.1.tar.gz,slim/dist

我们正试图提交一份关于GCP的培训工作。我跟着宠物教程走了很远,但现在我有点卡住了,希望有人能给我指出正确的方向

我们将通过以下命令开始培训工作:

gcloud ml-engine jobs submit training `whoami`_object_detection_`date +%s`  \
    --job-dir=${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_main \
    --runtime-version 1.11 \
    --region europe-west1 \
    --python-version 3.5
作业已成功排队,并显示在ML引擎任务概述中。在培训工作实际开始之前,会出现很多日志,看起来都是正确的。然后出现错误(下面日志中的第3行)。我将把日志的最后几行放在下面:

2019-02-26 16:03:42.994 CET master-replica-0 Running command: python3 -m object_detection.model_main --job-dir gs://tiotf_train_store/train
2019-02-26 16:04:01.119 CET master-replica-0 TF_CONFIG environment variable: {'environment': 'cloud', 'task': {'type': 'master', 'index': 0, 'cloud': 'sd5078b2935497c61-ml'}, 'job': {'runtime_version': '1.11', 'python_module': 'object_detection.model_main', 'package_uris': ['gs://tiotf_train_store/train/packages/4ce59656c997bb99dded0300dd801c07db79e589aee2d33fd2cc15b844d27c96/object_detection-0.1.tar.gz', 'gs://tiotf_train_store/train/packages/4ce59656c997bb99dded0300dd801c07db79e589aee2d33fd2cc15b844d27c96/slim-0.1.tar.gz', 'gs://tiotf_train_store/train/packages/4ce59656c997bb99dded0300dd801c07db79e589aee2d33fd2cc15b844d27c96/pycocotools-2.0.tar.gz'], 'region': 'europe-west1', 'job_dir': 'gs://tiotf_train_store/train', 'run_on_raw_vm': True, 'python_version': '3.5'}, 'cluster': {'master': ['127.0.0.1:2222']}}
2019-02-26 16:04:01.156 CET master-replica-0 Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/.local/lib/python3.5/site-packages/object_detection/model_main.py", line 109, in <module> tf.app.run() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "/root/.local/lib/python3.5/site-packages/object_detection/model_main.py", line 71, in main FLAGS.sample_1_of_n_eval_on_train_examples)) File "/root/.local/lib/python3.5/site-packages/object_detection/model_lib.py", line 566, in create_estimator_and_inputs config_override=config_override) File "/root/.local/lib/python3.5/site-packages/object_detection/utils/config_util.py", line 95, in get_configs_from_pipeline_file proto_str = f.read() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 125, in read self._preread_check() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 85, in _preread_check compat.as_bytes(self.__name), 1024 * 512, status) File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/compat.py", line 61, in as_bytes (bytes_or_text,)) TypeError: Expected binary or unicode string, got None
2019-02-26 16:04:01.623 CET master-replica-0 Command '['python3', '-m', 'object_detection.model_main', '--job-dir', 'gs://tiotf_train_store/train']' returned non-zero exit status 1

谢谢你的帮助。

经过几个小时的尝试,我想我找到了问题所在。将以下参数添加到gcloud命令:

-- 
--pipeline_config_path=[path to .config file]

现在培训工作正确开始了。

经过几个小时的尝试,我想我找到了问题所在。将以下参数添加到gcloud命令:

-- 
--pipeline_config_path=[path to .config file]
现在培训工作正确开始了