gpt4 book ai didi

python-3.x - 语法错误 : invalid syntax while running Job

转载 作者:行者123 更新时间:2023-12-04 02:10:22 26 4
gpt4 key购买 nike

作业是从终端使用以下命令启动的;

gcloud ml-engine jobs submit training barcode_detection_eight --runtime-version 1.8 --job-dir gs://barcode-object-detection/model_dir --packages dist/object_detection-0.1.tar.gz,slim/dist/slim-0.1.tar.gz,../../pycocotools/pycocotools-2.0.tar.gz --module-name object_detection.model_main --region us-central1 --config object_detection/samples/cloud/cloud.yml -- --model_dir=gs://barcode-object-detection/model_dir --pipeline_config_path=gs://barcode-object-detection/data/faster_rcnn_resnet101_pets.config

5 分钟后,作业因以下错误而终止;

ps-replica-2 Command '['python3', '-m', 'object_detection.model_main', '--model_dir=gs://barcode-object-detection/model_dir', '--pipeline_config_path=gs://barcode-object-detection/data/faster_rcnn_resnet101_pets.config', '--job-dir', 'gs://barcode-object-detection/model_dir']' returned non-zero exit status 1

还收到以下一系列无效语法错误;

{  insertId:  "1ma8zeeeuwhvz"    logName:  "projects/barcode-object-detection/logs/ml.googleapis.com%2Fbarcode_detection_eight" receiveTimestamp:  "2018-08-02T19:56:30.651437599Z"    resource: {   labels: {    job_id:  "barcode_detection_eight"        project_id:  "barcode-object-detection"        task_name:  "service"       }   type:  "ml_job"     }  severity:  "ERROR"    textPayload:  "The replica ps 0 exited with a non-zero status of 1. Termination reason: Error.  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 26, in <module>
from object_detection import model_lib File "/root/.local/lib/python3.5/site-packages/object_detection/model_lib.py", line 26, in <module>
from object_detection import eval_util File "/root/.local/lib/python3.5/site-packages/object_detection/eval_util.py", line 28, in <module>
from object_detection.metrics import coco_evaluation File "/root/.local/lib/python3.5/site-packages/object_detection/metrics/coco_evaluation.py", line 20, in <module>
from object_detection.metrics import coco_tools File "/root/.local/lib/python3.5/site-packages/object_detection/metrics/coco_tools.py", line 47, in <module>
from pycocotools import coco File "/root/.local/lib/python3.5/site-packages/pycocotools/coco.py", line 49
import matplotlibnmatplotlib.use('Agg')nimport matplotlib.pyplot as plt
^ SyntaxError: invalid syntax

The replica ps 1 exited with a non-zero status of 1. Termination reason: Error. 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 26, in <module>
from object_detection import model_lib File "/root/.local/lib/python3.5/site-packages/object_detection/model_lib.py", line 26, in <module>
from object_detection import eval_util File "/root/.local/lib/python3.5/site-packages/object_detection/eval_util.py", line 28, in <module>
from object_detection.metrics import coco_evaluation File "/root/.local/lib/python3.5/site-packages/object_detection/metrics/coco_evaluation.py", line 20, in <module>
from object_detection.metrics import coco_tools File "/root/.local/lib/python3.5/site-packages/object_detection/metrics/coco_tools.py", line 47, in <module>
from pycocotools import coco File "/root/.local/lib/python3.5/site-packages/pycocotools/coco.py", line 49
import matplotlibnmatplotlib.use('Agg')nimport matplotlib.pyplot as plt
^ SyntaxError: invalid syntax

The replica ps 2 exited with a non-zero status of 1. Termination reason: Error. 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 26, in <module>
from object_detection import model_lib File "/root/.local/lib/python3.5/site-packages/object_detection/model_lib.py", line 26, in <module>
from object_detection import eval_util File "/root/.local/lib/python3.5/site-packages/object_detection/eval_util.py", line 28, in <module>
from object_detection.metrics import coco_evaluation File "/root/.local/lib/python3.5/site-packages/object_detection/metrics/coco_evaluation.py", line 20, in <module>
from object_detection.metrics import coco_tools File "/root/.local/lib/python3.5/site-packages/object_detection/metrics/coco_tools.py", line 47, in <module>
from pycocotools import coco File "/root/.local/lib/python3.5/site-packages/pycocotools/coco.py", line 49
import matplotlibnmatplotlib.use('Agg')nimport matplotlib.pyplot as plt
^ SyntaxError: invalid syntax

timestamp: "2018-08-02T19:56:30.651437599Z" }

这个错误是什么意思?我用文档仔细检查了命令语法,但仍然收到此错误。专家的帮助将不胜感激。

最佳答案

根据runtime version list , 机器学习引擎不提供对 matplotlib 包的访问。如果删除依赖项,应用程序会工作吗?

关于python-3.x - 语法错误 : invalid syntax while running Job,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51674213/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com