2015-10-05 25 views
0

有关如何指定Google预测存储桶的任何经验。我继续在存储 - >云存储 - >浏览器中创建存储桶,方法是点击创建存储桶。我将这个桶命名为“UNIQUE001”。我上传数据根据他们的规格,一个CSV文件,如果字符串引用。我想训练模型,因此想运行预测API v1.6> prediction.trainedmodels.insert。这是帖子的请求Google预测API - storageDataLocation?

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

storageDataLocation值是存储桶名/文件名