我已经使用AWS Machine Learning训练了模型,现在正在实施定期的批次预测-唯一的问题是,当我使用API方法时,文档显示我似乎无法获得实际的预测(然后我要加载到另一个系统中):
batch_pred = client.create_batch_prediction(
BatchPredictionId = 'reg_pred_2',
BatchPredictionName = 'reg pred 2',
MLModelId = reg_test_02['MLModelId'],
BatchPredictionDataSourceId='pred_reg_1',
OutputUri='s3://ml-test-predicto-bucket/simulex1')
一旦我检查了来自此API调用的结果:
batch_predictions_1 = client.get_batch_prediction( BatchPredictionId = batch_pred["BatchPredictionId"])
我收到以下答复:
{'FinishedAt': datetime.datetime(2018, 7, 11, 8, 36, 22, 384000, tzinfo=tzlocal()), 'BatchPredictionId': 'reg_pred_2', 'ComputeTime': 46000, 'CreatedByIamUser': 'arn:aws:iam::421503419780:user/danmvi-aws', 'LastUpdatedAt': datetime.datetime(2018, 7, 11, 8, 36, 22, 384000, tzinfo=tzlocal()), 'InputDataLocationS3': 's3://ml-test-predicto-bucket/simulex1/reg_to_pred.csv', 'BatchPredictionDataSourceId': 'pred_reg_1', 'InvalidRecordCount': 10, 'MLModelId': 'MDL__02', 'LogUri': 'https://eml-prod-dub-emr.s3.amazonaws.com/421503419780-bp-reg_pred_2/userlog/421503419780-bp-reg_pred_2?AWSAccessKeyId=AKIAJJWPB3DRFZA5QJ3A&Expires=1531915259&Signature=7CGaDq%2FfmuWxZhNzfLJIfNcPhRs%3D', 'ResponseMetadata': {'RetryAttempts': 0, 'RequestId': '1328a6c7-8502-11e8-827c-dfaeeeb3bf06', 'HTTPStatusCode': 200, 'HTTPHeaders': {'date': 'Wed, 11 Jul 2018 12:00:59 GMT', 'content-length': '733', 'x-amzn-requestid': '1328a6c7-8502-11e8-827c-dfaeeeb3bf06', 'content-type': 'application/x-amz-json-1.1'}}, 'Status': 'COMPLETED', 'TotalRecordCount': 10, 'StartedAt': datetime.datetime(2018, 7, 11, 8, 34, 54, 680000, tzinfo=tzlocal()), 'OutputUri': 's3://ml-test-predicto-bucket/simulex1/', 'CreatedAt': datetime.datetime(2018, 7, 11, 8, 34, 53, 249000, tzinfo=tzlocal()), 'Name': 'reg pred 2'}
但是在字典中的所有条目中,我看不到任何一个可以让我解析我要得分的10个观测值中的每一个的实际预测... 预先感谢您的帮助!