我已经浏览了Google Prediction API教程和文档,了解"hello prediction - https://cloud.google.com/prediction/docs/hello_world“。
但是,在开发人员控制台中训练模型时,我的请求失败,输出如下:
请求:
POST https://www.googleapis.com/prediction/v1.6/projects/959568262740/trainedmodels?key={YOUR_API_KEY}
{
"id": "language_id",
"storageDataLocation": "http://storage.googleapis.com/2341234/language_id.txt"
}响应:
400 OK
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Training data file is empty.",
"locationType": "other",
"location": "id"
}
],
"code": 400,
"message": "Training data file is empty."
}
}我已经使用API2.0实现了授权请求:-是否还有其他我应该做的事情,或者在OAuth PRediction v1.6和本教程之间可能发生了变化。任何链接到任何额外的教程或文章的主题也是非常有价值的,所以可以调试我自己!
发布于 2015-06-04 16:28:04
您的storageDataLocation不正确。
当您转到Google Developers Console中的Overview选项卡时,您将找到您的项目ID: xxxxx (示例),您存储在其中的存储桶名为yyyy (示例)。
然后替换"storageDataLocation:“"xxxxx/yyyy”。应该可以解决这个问题。您需要的是Google Storage的相对路径,而不是绝对web路径。
https://stackoverflow.com/questions/29869302
复制相似问题