MachineLearning / Client / create_batch_prediction
create_batch_prediction#
- MachineLearning.Client.create_batch_prediction(**kwargs)#
- Generates predictions for a group of observations. The observations to process exist in one or more data files referenced by a - DataSource. This operation creates a new- BatchPrediction, and uses an- MLModeland the data files referenced by the- DataSourceas information sources.- CreateBatchPredictionis an asynchronous operation. In response to- CreateBatchPrediction, Amazon Machine Learning (Amazon ML) immediately returns and sets the- BatchPredictionstatus to- PENDING. After the- BatchPredictioncompletes, Amazon ML sets the status to- COMPLETED.- You can poll for status updates by using the GetBatchPrediction operation and checking the - Statusparameter of the result. After the- COMPLETEDstatus appears, the results are available in the location specified by the- OutputUriparameter.- See also: AWS API Documentation - Request Syntax - response = client.create_batch_prediction( BatchPredictionId='string', BatchPredictionName='string', MLModelId='string', BatchPredictionDataSourceId='string', OutputUri='string' ) - Parameters:
- BatchPredictionId (string) – - [REQUIRED] - A user-supplied ID that uniquely identifies the - BatchPrediction.
- BatchPredictionName (string) – A user-supplied name or description of the - BatchPrediction.- BatchPredictionNamecan only use the UTF-8 character set.
- MLModelId (string) – - [REQUIRED] - The ID of the - MLModelthat will generate predictions for the group of observations.
- BatchPredictionDataSourceId (string) – - [REQUIRED] - The ID of the - DataSourcethat points to the group of observations to predict.
- OutputUri (string) – - [REQUIRED] - The location of an Amazon Simple Storage Service (Amazon S3) bucket or directory to store the batch prediction results. The following substrings are not allowed in the - s3 keyportion of the- outputURIfield: ‘:’, ‘//’, ‘/./’, ‘/../’.- Amazon ML needs permissions to store and retrieve the logs on your behalf. For information about how to set permissions, see the Amazon Machine Learning Developer Guide. 
 
- Return type:
- dict 
- Returns:
- Response Syntax - { 'BatchPredictionId': 'string' } - Response Structure - (dict) – - Represents the output of a - CreateBatchPredictionoperation, and is an acknowledgement that Amazon ML received the request.- The - CreateBatchPredictionoperation is asynchronous. You can poll for status updates by using the- >GetBatchPredictionoperation and checking the- Statusparameter of the result.- BatchPredictionId (string) – - A user-supplied ID that uniquely identifies the - BatchPrediction. This value is identical to the value of the- BatchPredictionIdin the request.
 
 
 - Exceptions - MachineLearning.Client.exceptions.InvalidInputException
- MachineLearning.Client.exceptions.InternalServerException
- MachineLearning.Client.exceptions.IdempotentParameterMismatchException