Pablo
Pablo

Reputation: 3514

Unrecognized arguments gcloud command in powershell

I'm running the next command in powershell to execute a train job in cloudml it worked until I added the USER_ARGS

gcloud ml-engine jobs submit training my_job_$([datetime]::now.tostring("yyyyMMddHHmm")) `
--module-name=mypackage.mymodule `
--package-path mypackage `
--region=us-east1 `
--staging-bucket=gs://mybucket `
--config config.yaml `
--runtime-version=1.10 `
-- `
--window_size=1 `
--past_lag_range=20 

It raised the next error

ERROR: (gcloud.ml-engine.jobs.submit.training) unrecognized arguments:
  --window_size=1
  --past_lag_range=20

I couldn't found in the documentation some topic related with powershell, any guidance in this issue ?

Edit

Apparently its a problem with the -- command, I paste the same command in cmd (without the "`" chars) and it worked.

Upvotes: 1

Views: 1760

Answers (1)

Pablo
Pablo

Reputation: 3514

I couldn't found a way to make the command work in powershell, but I finally make it work in cmd. My intuition is that there might be a problem with the -- string, it is possible that for ps represent something else.

Anyway, the cmd command:

gcloud ml-engine jobs submit training my_job_%date:~6,4%%date:~3,2%%date:~0,2%%time:~0,2%%time:~3,2% ^
        --module-name=my_package.my_module ^
        --package-path my_package ^
        --region=us-east1 ^
        --staging-bucket=gs://my_storage ^
        --config config.yaml ^
        --runtime-version=1.10 ^ 
        -- ^
        --window_size=1 ^
        --past_lag_range=20 

Upvotes: 2

Related Questions