2

ml engine errorI keep running into the unrecognized arguments issue when submitting a training job. This post is similar to mine, but I don't understand what the accepted answer was about.

I have tried adding --job-dir as a user defined argument and popping it from my arguments in my task.py:

args = parser.parse_args()
arguments = args.__dict__
arguments.pop('job-dir')
arguments.pop('job_dir')

but that didn't work.

This is my command to submit the training:

gcloud ai-platform jobs submit training model2_60days_23 \
--scale-tier basic  \
--package-path C:/Users/me/ml/trainer \
--module-name trainer.task \
--job-dir=gs://my_bucket/ML/job_output \
--region us-east1 \
--python-version 3.5 \
--runtime-version 1.13 \
-- \
--config_path="gs://my_bucket/ML/config/model_params.json" \
--mode=train \
--look_forward=60 

How can i resolve this?

AntsaR
  • 380
  • 1
  • 9
  • 28
  • If you set the api field jobDir, the service will pass a flag --job-dir to your code, and you are supposed to parse it. – Guoqing Xu Jul 12 '19 at 19:06
  • Please take a look at this new repo https://github.com/GoogleCloudPlatform/ai-platform-samples/blob/master/training/tensorflow/structured/base/trainer/task.py. You have `task.py` which reads parameters from `gcloud` command – gogasca Jul 22 '19 at 22:45

0 Answers0