4

Trying to submit a Google Cloud ML Training job for Tensorflow Object Detection task and I am following the official guideline

Following is the job that I am submitting:

export CONFIG=trainer/cloud.yaml
export TRAIN_DIR=kt-1000/training
export PIPELINE_CONFIG=kt-1000/training/ssd_mobilenet_v1_pets.config

gcloud ml-engine jobs submit training object_detection_`date +%s` \

   

    --job-dir=gs://${TRAIN_DIR} \
    --packages dist/object_detection-0.1.tar.gz,slim/dist/slim
0.1.tar.gz \
    --module-name object_detection.train \
    --region asia-east1-a \
    --config ${CONFIG} \
    -- \
    --train_dir=gs://${TRAIN_DIR} \
    --pipeline_config_path=gs://${PIPELINE_CONFIG}

I am getting the following error message:

ERROR: (gcloud.ml-engine.jobs.submit.training) unrecognized arguments:

The Error message however does not point out which argument/s is unrecognised though!!!!

Any help on this will be truly appreciated

Thanks,

Devjothi

4 Answers4

2

You just have to remove any space before --, like this:

gcloud ml-engine jobs submit training $JOB_NAME \
--job-dir $OUTPUT_PATH \
--runtime-version 1.10  \
--python-version 3.5 \
--module-name trainer.task \
--package-path trainer/ \
--region $REGION \
-- \
--train-files $TRAIN_DATA \
--eval-files $EVAL_DATA \
--train-steps 1000 \
--eval-steps 100 \
--verbosity DEBUG
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
장재훈
  • 621
  • 1
  • 6
  • 9
  • That was precisely my problem and it should be the accepted answer. I'm used to adding spaces in script files to help with readability which led to the error – zai chang Mar 15 '19 at 15:39
1

I met the problems as well with the official guideline on my windows machine.

1.Check what is the unrecognized arguments.

2.Beware of between --config and --train_dir there is an empty -- (that was my error came from)

ps: on windows there is no date +%s. Therefore, I replace by my own JOB_NAME.

Tsui Hao
  • 11
  • 3
0

Try without the job-dir. You don't need to specify job-dir. ML Engine will pass in a job-dir when it invokes your job

Lak
  • 3,876
  • 20
  • 34
  • :I took out job-dir but still getting the same message. Will request if someone from Google Cloud ML team can take a look at this and respond back. Please note that I have followed the same steps as mentioned in the Google Cloud ML documentation in Github – Devjothi Dutta Oct 30 '17 at 12:29
0

in my case, i added the following

import gcsfs

then the $ variables are recognized.

FRH
  • 37
  • 10