如何解决Google AI Platform XGBoost-本地预测有效,但在线预测无效
我能够使用gcloud生成XGBoost模型的本地预测,但无法生成在线预测。在线预测没有错误消息,只有空响应
本地预测-
输入json-[40,1,20,3,2020,4,2,5,6,0]
gcloud-
gcloud ai-platform local predict --model-dir <model_dir> --json-instances <input_json> --framework xgboost
输出-
INFO: Display format: "default table[no-heading](predictions)"
[0.3261602520942688]
当我使用相同的json生成在线预测时
在线预测
gcloud-
gcloud ai-platform predict --model $MODEL_NAME --version $VERSION_NAME --json-instances test_json_modified.json
输出-
INFO: Display format: "default table[no-heading](predictions)"
[[]]
我尝试使用如下所示的其他输入json格式,但是没有用-
{"instances": [{"values": [[40,0]],"key": 1}]}
解决方法
与Gcp预测环境相比,您的训练中的xgboost版本可能有所不同
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。