batch_predictions
Creates, updates, deletes, gets or lists a batch_predictions resource.
Overview
| Name | batch_predictions |
| Type | Resource |
| Id | aws.machinelearning.batch_predictions |
Fields
The following fields are returned by SELECT queries:
- get_batch_prediction
- describe_batch_predictions
| Name | Datatype | Description |
|---|---|---|
batch_prediction_data_source_id | string | The ID of the DataSource that was used to create the BatchPrediction. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
batch_prediction_id | string | An ID assigned to the BatchPrediction at creation. This value should be identical to the value of the BatchPredictionID in the request. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
compute_time | integer (int64) | Long integer type that is a 64-bit signed number. |
created_at | string (date-time) | A timestamp represented in epoch time. |
created_by_iam_user | string | The AWS user account that invoked the BatchPrediction. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account. (pattern: <code>arn:aws:iam::[0-9]+:((user/.+)|(root))</code>) |
finished_at | string (date-time) | A timestamp represented in epoch time. |
input_data_location_s3 | string | The location of the data file or directory in Amazon Simple Storage Service (Amazon S3). (pattern: <code>s3://([^/]+)(/.*)?</code>) |
invalid_record_count | integer (int64) | Long integer type that is a 64-bit signed number. |
last_updated_at | string (date-time) | A timestamp represented in epoch time. |
log_uri | string | A link to the file that contains logs of the CreateBatchPrediction operation. |
ml_model_id | string | The ID of the MLModel that generated predictions for the BatchPrediction request. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
message | string | A description of the most recent details about processing the batch prediction request. |
name | string | A user-supplied name or description of the BatchPrediction. (pattern: <code>.\S.|^$</code>) |
output_uri | string | The location of an Amazon S3 bucket or directory to receive the operation results. (pattern: <code>s3://([^/]+)(/.*)?</code>) |
started_at | string (date-time) | A timestamp represented in epoch time. |
status | string | The status of the BatchPrediction, which can be one of the following values: PENDING - Amazon Machine Learning (Amazon ML) submitted a request to generate batch predictions. INPROGRESS - The batch predictions are in progress. FAILED - The request to perform a batch prediction did not run to completion. It is not usable. COMPLETED - The batch prediction process completed successfully. DELETED - The BatchPrediction is marked as deleted. It is not usable. (PENDING, INPROGRESS, FAILED, COMPLETED, DELETED) |
total_record_count | integer (int64) | Long integer type that is a 64-bit signed number. |
| Name | Datatype | Description |
|---|---|---|
batch_prediction_data_source_id | string | The ID of the DataSource that points to the group of observations to predict. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
batch_prediction_id | string | The ID assigned to the BatchPrediction at creation. This value should be identical to the value of the BatchPredictionID in the request. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
compute_time | integer (int64) | Long integer type that is a 64-bit signed number. |
created_at | string (date-time) | The time that the BatchPrediction was created. The time is expressed in epoch time. |
created_by_iam_user | string | The AWS user account that invoked the BatchPrediction. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account. (pattern: <code>arn:aws:iam::[0-9]+:((user/.+)|(root))</code>) |
finished_at | string (date-time) | A timestamp represented in epoch time. |
input_data_location_s3 | string | The location of the data file or directory in Amazon Simple Storage Service (Amazon S3). (pattern: <code>s3://([^/]+)(/.*)?</code>) |
invalid_record_count | integer (int64) | Long integer type that is a 64-bit signed number. |
last_updated_at | string (date-time) | The time of the most recent edit to the BatchPrediction. The time is expressed in epoch time. |
ml_model_id | string | The ID of the MLModel that generated predictions for the BatchPrediction request. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
message | string | A description of the most recent details about processing the batch prediction request. |
name | string | A user-supplied name or description of the BatchPrediction. (pattern: <code>.\S.|^$</code>) |
output_uri | string | The location of an Amazon S3 bucket or directory to receive the operation results. The following substrings are not allowed in the s3 key portion of the outputURI field: ':', '//', '/./', '/../'. (pattern: <code>s3://([^/]+)(/.*)?</code>) |
started_at | string (date-time) | A timestamp represented in epoch time. |
status | string | The status of the BatchPrediction. This element can have one of the following values: PENDING - Amazon Machine Learning (Amazon ML) submitted a request to generate predictions for a batch of observations. INPROGRESS - The process is underway. FAILED - The request to perform a batch prediction did not run to completion. It is not usable. COMPLETED - The batch prediction process completed successfully. DELETED - The BatchPrediction is marked as deleted. It is not usable. (PENDING, INPROGRESS, FAILED, COMPLETED, DELETED) |
total_record_count | integer (int64) | Long integer type that is a 64-bit signed number. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_batch_prediction | select | region | Returns a BatchPrediction that includes detailed metadata, status, and data file information for a Batch Prediction request. | |
describe_batch_predictions | select | region | Returns a list of BatchPrediction operations that match the search criteria in the request. | |
create_batch_prediction | insert | region, BatchPredictionId, MLModelId, BatchPredictionDataSourceId, OutputUri | 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 MLModel and the data files referenced by the DataSource as information sources. CreateBatchPrediction is an asynchronous operation. In response to CreateBatchPrediction, Amazon Machine Learning (Amazon ML) immediately returns and sets the BatchPrediction status to PENDING. After the BatchPrediction completes, Amazon ML sets the status to COMPLETED. You can poll for status updates by using the GetBatchPrediction operation and checking the Status parameter of the result. After the COMPLETED status appears, the results are available in the location specified by the OutputUri parameter. | |
update_batch_prediction | update | region, BatchPredictionId, BatchPredictionName | Updates the BatchPredictionName of a BatchPrediction. You can use the GetBatchPrediction operation to view the contents of the updated data element. | |
delete_batch_prediction | delete | region | Assigns the DELETED status to a BatchPrediction, rendering it unusable. After using the DeleteBatchPrediction operation, you can use the GetBatchPrediction operation to verify that the status of the BatchPrediction changed to DELETED. Caution: The result of the DeleteBatchPrediction operation is irreversible. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_batch_prediction
- describe_batch_predictions
Returns a BatchPrediction that includes detailed metadata, status, and data file information for a Batch Prediction request.
SELECT
batch_prediction_data_source_id,
batch_prediction_id,
compute_time,
created_at,
created_by_iam_user,
finished_at,
input_data_location_s3,
invalid_record_count,
last_updated_at,
log_uri,
ml_model_id,
message,
name,
output_uri,
started_at,
status,
total_record_count
FROM aws.machinelearning.batch_predictions
WHERE region = '{{ region }}' -- required
;
Returns a list of BatchPrediction operations that match the search criteria in the request.
SELECT
batch_prediction_data_source_id,
batch_prediction_id,
compute_time,
created_at,
created_by_iam_user,
finished_at,
input_data_location_s3,
invalid_record_count,
last_updated_at,
ml_model_id,
message,
name,
output_uri,
started_at,
status,
total_record_count
FROM aws.machinelearning.batch_predictions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_batch_prediction
- Manifest
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 MLModel and the data files referenced by the DataSource as information sources. CreateBatchPrediction is an asynchronous operation. In response to CreateBatchPrediction, Amazon Machine Learning (Amazon ML) immediately returns and sets the BatchPrediction status to PENDING. After the BatchPrediction completes, Amazon ML sets the status to COMPLETED. You can poll for status updates by using the GetBatchPrediction operation and checking the Status parameter of the result. After the COMPLETED status appears, the results are available in the location specified by the OutputUri parameter.
INSERT INTO aws.machinelearning.batch_predictions (
BatchPredictionId,
BatchPredictionName,
MLModelId,
BatchPredictionDataSourceId,
OutputUri,
region
)
SELECT
'{{ BatchPredictionId }}' /* required */,
'{{ BatchPredictionName }}',
'{{ MLModelId }}' /* required */,
'{{ BatchPredictionDataSourceId }}' /* required */,
'{{ OutputUri }}' /* required */,
'{{ region }}'
RETURNING
batch_prediction_id
;
# Description fields are for documentation purposes
- name: batch_predictions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the batch_predictions resource.
- name: BatchPredictionId
value: "{{ BatchPredictionId }}"
description: |
A user-supplied ID that uniquely identifies the BatchPrediction.
- name: BatchPredictionName
value: "{{ BatchPredictionName }}"
description: |
A user-supplied name or description of the BatchPrediction. BatchPredictionName can only use the UTF-8 character set.
- name: MLModelId
value: "{{ MLModelId }}"
description: |
The ID of the MLModel that will generate predictions for the group of observations.
- name: BatchPredictionDataSourceId
value: "{{ BatchPredictionDataSourceId }}"
description: |
The ID of the DataSource that points to the group of observations to predict.
- name: OutputUri
value: "{{ OutputUri }}"
description: |
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 key portion of the outputURI field: ':', '//', '/./', '/../'. 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.
UPDATE examples
- update_batch_prediction
Updates the BatchPredictionName of a BatchPrediction. You can use the GetBatchPrediction operation to view the contents of the updated data element.
UPDATE aws.machinelearning.batch_predictions
SET
BatchPredictionId = '{{ BatchPredictionId }}',
BatchPredictionName = '{{ BatchPredictionName }}'
WHERE
region = '{{ region }}' --required
AND BatchPredictionId = '{{ BatchPredictionId }}' --required
AND BatchPredictionName = '{{ BatchPredictionName }}' --required
RETURNING
batch_prediction_id;
DELETE examples
- delete_batch_prediction
Assigns the DELETED status to a BatchPrediction, rendering it unusable. After using the DeleteBatchPrediction operation, you can use the GetBatchPrediction operation to verify that the status of the BatchPrediction changed to DELETED. Caution: The result of the DeleteBatchPrediction operation is irreversible.
DELETE FROM aws.machinelearning.batch_predictions
WHERE region = '{{ region }}' --required
;