Reputation: 549
I am trying to deploy a model to Google ML Engine using DataLab. The code works in my live project datalab but gives a syntax error on my staging datalab. I thought this may be due to different versions of gcloud and so I ran the updates but I am still getting the same syntax error. How can I fix this?
Code:
MODEL_NAME="waittimes_model_03"
MODEL_VERSION="ml_on_gcp_waittimes_06"
gcloud ml-engine models create ${MODEL_NAME} --regions us-central1
gcloud ml-engine versions create ${MODEL_VERSION} --model ${MODEL_NAME} --origin waitestimates/export/exporter/1532010994 --staging-bucket ${BUCKET} --runtime-version 1.6
Error:
File "<ipython-input-4-104542ff058c>", line 8
gcloud ml-engine models create ${MODEL_NAME} --regions us-central1
^
SyntaxError: invalid syntax
Upvotes: 0
Views: 209
Reputation: 38579
Add the !
prefix to your command, e.g.,
!gcloud ml-engine models create ${MODEL_NAME} --regions us-central1
Upvotes: 1