Skip to content

list_candidates_for_auto_ml_job

list_candidates_for_auto_ml_job(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    auto_ml_job_name: Optional[AutoMLJobName] = None,
    status_equals: Optional[CandidateStatus] = None,
    candidate_name_equals: Optional[CandidateName] = None,
    sort_order: Optional[AutoMLSortOrder] = None,
    sort_by: Optional[CandidateSortBy] = None,
    max_results: Optional[AutoMLMaxResultsForTrials] = None,
    next_token: Optional[NextToken] = None,
) -> ListCandidatesForAutoMLJobResponse

List the candidates created for the job.

Parameters:

  • auto_ml_job_name (Optional[AutoMLJobName], default: None ) –

    List the candidates created for the job by providing the job's name.

  • status_equals (Optional[CandidateStatus], default: None ) –

    List the candidates for the job and filter by status.

  • candidate_name_equals (Optional[CandidateName], default: None ) –

    List the candidates for the job and filter by candidate name.

  • sort_order (Optional[AutoMLSortOrder], default: None ) –

    The sort order for the results. The default is Ascending.

  • sort_by (Optional[CandidateSortBy], default: None ) –

    The parameter by which to sort the results. The default is Descending.

  • max_results (Optional[AutoMLMaxResultsForTrials], default: None ) –

    List the job's candidates up to a specified limit.

  • next_token (Optional[NextToken], default: None ) –

    If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_candidates_for_auto_ml_job(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    auto_ml_job_name: Optional[
        "capo_sagemaker.types.auto_ml_job_name.AutoMLJobName"
    ] = None,
    status_equals: Optional[
        "capo_sagemaker.types.candidate_status.CandidateStatus"
    ] = None,
    candidate_name_equals: Optional[
        "capo_sagemaker.types.candidate_name.CandidateName"
    ] = None,
    sort_order: Optional[
        "capo_sagemaker.types.auto_ml_sort_order.AutoMLSortOrder"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.candidate_sort_by.CandidateSortBy"
    ] = None,
    max_results: Optional[
        "capo_sagemaker.types.auto_ml_max_results_for_trials.AutoMLMaxResultsForTrials"
    ] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
) -> "capo_sagemaker.types.list_candidates_for_auto_ml_job_response.ListCandidatesForAutoMLJobResponse":
    """<p>List the candidates created for the job.</p>

    Args:
        auto_ml_job_name: <p>List the candidates created for the job by providing the job's name.</p>
        status_equals: <p>List the candidates for the job and filter by status.</p>
        candidate_name_equals: <p>List the candidates for the job and filter by candidate name.</p>
        sort_order: <p>The sort order for the results. The default is <code>Ascending</code>.</p>
        sort_by: <p>The parameter by which to sort the results. The default is <code>Descending</code>.</p>
        max_results: <p>List the job's candidates up to a specified limit.</p>
        next_token: <p>If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_candidates_for_auto_ml_job_request.ListCandidatesForAutoMLJobRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_candidates_for_auto_ml_job_response.ListCandidatesForAutoMLJobResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_candidates_for_auto_ml_job

        output, http_response = (
            capo_sagemaker._operations.sage_maker.list_candidates_for_auto_ml_job.list_candidates_for_auto_ml_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCandidatesForAutoMLJob")
    )
    input_: capo_sagemaker.types.list_candidates_for_auto_ml_job_request.ListCandidatesForAutoMLJobRequest = {}
    if auto_ml_job_name is not None:
        input_["auto_ml_job_name"] = auto_ml_job_name
    if status_equals is not None:
        input_["status_equals"] = status_equals
    if candidate_name_equals is not None:
        input_["candidate_name_equals"] = candidate_name_equals
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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