Returns a BatchPrediction that includes detailed metadata, status, and data file information for a Batch Prediction request.
Parameters:
-
batch_prediction_id
(EntityId)
–
An ID assigned to the BatchPrediction at creation.
Raises:
Source code in docs_src/capo_machine_learning/_services/async_machine_learning.py
| async def get_batch_prediction(
self,
batch_prediction_id: "capo_machine_learning.types.entity_id.EntityId",
*,
config_overrides: Optional[AsyncMachineLearningClientConfig] = None,
) -> "capo_machine_learning.types.get_batch_prediction_output.GetBatchPredictionOutput":
"""<p>Returns a <code>BatchPrediction</code> that includes detailed metadata, status, and data file information for a <code>Batch Prediction</code> request.</p>
Args:
batch_prediction_id: <p>An ID assigned to the <code>BatchPrediction</code> at creation.</p>
Raises:
capo_machine_learning.errors.internal_server_exception.InternalServerException: <p>An error on the server occurred when trying to process a request.</p>
capo_machine_learning.errors.invalid_input_exception.InvalidInputException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
capo_machine_learning.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource cannot be located.</p>
capo_machine_learning.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_machine_learning.types.get_batch_prediction_input.GetBatchPredictionInput]",
) -> AsyncOperationResponse[
"capo_machine_learning.types.get_batch_prediction_output.GetBatchPredictionOutput"
]:
import capo_machine_learning._operations.amazon_ml_20141212.get_batch_prediction
(
output,
http_response,
) = await capo_machine_learning._operations.amazon_ml_20141212.get_batch_prediction.async_get_batch_prediction(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetBatchPrediction")
)
input_: capo_machine_learning.types.get_batch_prediction_input.GetBatchPredictionInput = {
"batch_prediction_id": batch_prediction_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|