Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 在Google Datalab中运行“gcloud ml engine”命令时出现语法错误_Google Cloud Platform_Google Cloud Ml_Google Cloud Datalab - Fatal编程技术网

Google cloud platform 在Google Datalab中运行“gcloud ml engine”命令时出现语法错误

Google cloud platform 在Google Datalab中运行“gcloud ml engine”命令时出现语法错误,google-cloud-platform,google-cloud-ml,google-cloud-datalab,Google Cloud Platform,Google Cloud Ml,Google Cloud Datalab,我正在尝试使用DataLab将一个模型部署到GoogleML引擎。该代码在我的live project datalab中工作,但在我的暂存datalab中出现语法错误。我想这可能是由于gcloud的版本不同,所以我运行了更新,但仍然得到相同的语法错误。我怎样才能解决这个问题 代码: 错误: File "<ipython-input-4-104542ff058c>", line 8 gcloud ml-engine models create ${MODEL_NAME} --r

我正在尝试使用DataLab将一个模型部署到GoogleML引擎。该代码在我的live project datalab中工作,但在我的暂存datalab中出现语法错误。我想这可能是由于gcloud的版本不同,所以我运行了更新,但仍然得到相同的语法错误。我怎样才能解决这个问题

代码:

错误:

File "<ipython-input-4-104542ff058c>", line 8
    gcloud ml-engine models create ${MODEL_NAME} --regions us-central1
            ^
SyntaxError: invalid syntax
加上!命令的前缀,例如

!gcloud ml-engine models create ${MODEL_NAME} --regions us-central1

谢谢这起作用了。我还注意到,使用单个%而不是我正在使用的%%也很有效。
!gcloud ml-engine models create ${MODEL_NAME} --regions us-central1