输入实例不是 JSON 格式
Input instances are not in JSON format
我正在使用 Google 的 public 模板和位于 here
的示例练习 GCP ML 引擎
在我运行示例“housing-regression”LOCALLY中的代码后,模型成功生成。
然而,在预测中,出现了错误
ERROR: (gcloud.ml-engine.local.predict) Input instances are not in JSON format.
See "gcloud ml-engine predict --help" for details.
代码我运行在local-train.sh
gcloud ml-engine local predict --model-dir=${MODEL_LOCATION} --json-instances=data/new-data.json
有没有人遇到同样的问题?我是不是在某处弄错了,或者我可能遗漏了一些信息?
备注:
- 此代码是 运行 在我的本地 Mac 使用我安装的 GCP SDK
- 我检查了文件,确实是一个JSON文件。
对于在线预测,json 需要每行一个实例。所以尝试删除漂亮的格式...
我正在使用 Google 的 public 模板和位于 here
的示例练习 GCP ML 引擎在我运行示例“housing-regression”LOCALLY中的代码后,模型成功生成。
然而,在预测中,出现了错误
ERROR: (gcloud.ml-engine.local.predict) Input instances are not in JSON format.
See "gcloud ml-engine predict --help" for details.
代码我运行在local-train.sh
gcloud ml-engine local predict --model-dir=${MODEL_LOCATION} --json-instances=data/new-data.json
有没有人遇到同样的问题?我是不是在某处弄错了,或者我可能遗漏了一些信息?
备注:
- 此代码是 运行 在我的本地 Mac 使用我安装的 GCP SDK
- 我检查了文件,确实是一个JSON文件。
对于在线预测,json 需要每行一个实例。所以尝试删除漂亮的格式...