Skip to content

describe_predictor

describe_predictor(
    predictor_arn: Arn, *, config_overrides: Optional[forecastClientConfig] = None
) -> DescribePredictorResponse

This operation is only valid for legacy predictors created with CreatePredictor. If you are not using a legacy predictor, use DescribeAutoPredictor.

Describes a predictor created using the CreatePredictor operation.

In addition to listing the properties provided in the CreatePredictor request, this operation lists the following properties:

  • DatasetImportJobArns - The dataset import jobs used to import training data.

  • AutoMLAlgorithmArns - If AutoML is performed, the algorithms that were evaluated.

  • CreationTime

  • LastModificationTime

  • Status

  • Message - If an error occurred, information about the error.

Parameters:

  • predictor_arn (Arn) –

    The Amazon Resource Name (ARN) of the predictor that you want information about.

Raises:

  • InvalidInputException –

    We can't process the request because it includes an invalid value or a value that exceeds the valid range.

  • ResourceNotFoundException –

    We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_forecast/_services/forecast.py
def describe_predictor(
    self,
    predictor_arn: "capo_forecast.types.arn.Arn",
    *,
    config_overrides: Optional[forecastClientConfig] = None,
) -> "capo_forecast.types.describe_predictor_response.DescribePredictorResponse":
    """<note> <p> This operation is only valid for legacy predictors created with CreatePredictor. If you are not using a legacy predictor, use <a>DescribeAutoPredictor</a>.</p> </note> <p>Describes a predictor created using the <a>CreatePredictor</a> operation.</p> <p>In addition to listing the properties provided in the <code>CreatePredictor</code> request, this operation lists the following properties:</p> <ul> <li> <p> <code>DatasetImportJobArns</code> - The dataset import jobs used to import training data.</p> </li> <li> <p> <code>AutoMLAlgorithmArns</code> - If AutoML is performed, the algorithms that were evaluated.</p> </li> <li> <p> <code>CreationTime</code> </p> </li> <li> <p> <code>LastModificationTime</code> </p> </li> <li> <p> <code>Status</code> </p> </li> <li> <p> <code>Message</code> - If an error occurred, information about the error.</p> </li> </ul>

    Args:
        predictor_arn: <p>The Amazon Resource Name (ARN) of the predictor that you want information about.</p>

    Raises:
        capo_forecast.errors.invalid_input_exception.InvalidInputException: <p>We can't process the request because it includes an invalid value or a value that exceeds the valid range.</p>
        capo_forecast.errors.resource_not_found_exception.ResourceNotFoundException: <p>We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.</p>
        capo_forecast.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_forecast.types.describe_predictor_request.DescribePredictorRequest]",
    ) -> OperationResponse[
        "capo_forecast.types.describe_predictor_response.DescribePredictorResponse"
    ]:
        import capo_forecast._operations.amazon_forecast.describe_predictor

        output, http_response = (
            capo_forecast._operations.amazon_forecast.describe_predictor.describe_predictor(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribePredictor")
    )
    input_: capo_forecast.types.describe_predictor_request.DescribePredictorRequest = {
        "predictor_arn": predictor_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output