有关如何指定Google预测存储桶的任何经验。我继续在Storage中创建了一个存储桶 - >云存储 - >单击按钮创建存储桶浏览器。我把这个桶命名为一个独特的名字,并说出#34; UNIQUE001"。我根据他们的规格上传了数据,一个CSV文件,如果是字符串则引用。我想训练模型,因此想要运行Prediction API v1.6> prediction.trainedmodels.insert。这是我的帖子请求
POST https://www.googleapis.com/prediction/v1.6/projects/XXXXXXXXX/trainedmodels?fields=created%2Cid%2Ckind%2CmodelInfo%2CmodelType%2CselfLink%2CstorageDataLocation%2CstoragePMMLLocation%2CstoragePMMLModelLocation%2CtrainingComplete%2CtrainingStatus
{
"id": "CodePrediction",
"storageDataLocation": "dataset.csv",
"modelType": "CLASSIFICATION"
}
我收到错误回复"未找到培训数据" 400 OK
显示标题 -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Training data file not found."
}
],
"code": 400,
"message": "Training data file not found."
}
}
不确定,我猜怎么指定storageDataLocation。我试过了 1)gs:// UNIQUE001 2)ProjectNumber / UNIQUE001
当我提供ProjectNumber / bucketName时,这是错误,
Request
POST https://www.googleapis.com/prediction/v1.6/projects/xxxx/trainedmodels?fields=created%2Cid%2Ckind%2CmodelInfo%2CmodelType%2CselfLink%2CstorageDataLocation%2CstoragePMMLLocation%2CstoragePMMLModelLocation%2CtrainingComplete%2CtrainingStatus
{
"id": "CodePrediction",
"storageDataLocation": "xxxxxxx/UNIQUE001",
"modelType": "CLASSIFICATION"
}
错误
400 OK
显示标题 -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Training data file is empty.",
"locationType": "other",
"location": "id"
}
],
"code": 400,
"message": "Training data file is empty."
}
}
数据集不为空。它有百万行
答案 0 :(得分:0)
storageDataLocation值为bucketname / filename