Skip to content

list_hyper_parameter_tuning_jobs

list_hyper_parameter_tuning_jobs(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    sort_by: Optional[HyperParameterTuningJobSortByOptions] = None,
    sort_order: Optional[SortOrder] = None,
    name_contains: Optional[NameContains] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    last_modified_time_after: Optional[Timestamp] = None,
    last_modified_time_before: Optional[Timestamp] = None,
    status_equals: Optional[HyperParameterTuningJobStatus] = None,
) -> ListHyperParameterTuningJobsResponse

Gets a list of HyperParameterTuningJobSummary objects that describe the hyperparameter tuning jobs launched in your account.

Parameters:

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

    If the result of the previous ListHyperParameterTuningJobs request was truncated, the response includes a NextToken. To retrieve the next set of tuning jobs, use the token in the next request.

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

    The maximum number of tuning jobs to return. The default value is 10.

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

    The field to sort results by. The default is Name.

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

    The sort order for results. The default is Ascending.

  • name_contains (Optional[NameContains], default: None ) –

    A string in the tuning job name. This filter returns only tuning jobs whose name contains the specified string.

  • creation_time_after (Optional[Timestamp], default: None ) –

    A filter that returns only tuning jobs that were created after the specified time.

  • creation_time_before (Optional[Timestamp], default: None ) –

    A filter that returns only tuning jobs that were created before the specified time.

  • last_modified_time_after (Optional[Timestamp], default: None ) –

    A filter that returns only tuning jobs that were modified after the specified time.

  • last_modified_time_before (Optional[Timestamp], default: None ) –

    A filter that returns only tuning jobs that were modified before the specified time.

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

    A filter that returns only tuning jobs with the specified status.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_hyper_parameter_tuning_jobs(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    sort_by: Optional[
        "capo_sagemaker.types.hyper_parameter_tuning_job_sort_by_options.HyperParameterTuningJobSortByOptions"
    ] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
    name_contains: Optional[
        "capo_sagemaker.types.name_contains.NameContains"
    ] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    last_modified_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    last_modified_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    status_equals: Optional[
        "capo_sagemaker.types.hyper_parameter_tuning_job_status.HyperParameterTuningJobStatus"
    ] = None,
) -> "capo_sagemaker.types.list_hyper_parameter_tuning_jobs_response.ListHyperParameterTuningJobsResponse":
    """<p>Gets a list of <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTuningJobSummary.html">HyperParameterTuningJobSummary</a> objects that describe the hyperparameter tuning jobs launched in your account.</p>

    Args:
        next_token: <p>If the result of the previous <code>ListHyperParameterTuningJobs</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of tuning jobs, use the token in the next request.</p>
        max_results: <p>The maximum number of tuning jobs to return. The default value is 10.</p>
        sort_by: <p>The field to sort results by. The default is <code>Name</code>.</p>
        sort_order: <p>The sort order for results. The default is <code>Ascending</code>.</p>
        name_contains: <p>A string in the tuning job name. This filter returns only tuning jobs whose name contains the specified string.</p>
        creation_time_after: <p>A filter that returns only tuning jobs that were created after the specified time.</p>
        creation_time_before: <p>A filter that returns only tuning jobs that were created before the specified time.</p>
        last_modified_time_after: <p>A filter that returns only tuning jobs that were modified after the specified time.</p>
        last_modified_time_before: <p>A filter that returns only tuning jobs that were modified before the specified time.</p>
        status_equals: <p>A filter that returns only tuning jobs with the specified status.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_hyper_parameter_tuning_jobs_request.ListHyperParameterTuningJobsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_hyper_parameter_tuning_jobs_response.ListHyperParameterTuningJobsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_hyper_parameter_tuning_jobs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListHyperParameterTuningJobs")
    )
    input_: capo_sagemaker.types.list_hyper_parameter_tuning_jobs_request.ListHyperParameterTuningJobsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before
    if last_modified_time_after is not None:
        input_["last_modified_time_after"] = last_modified_time_after
    if last_modified_time_before is not None:
        input_["last_modified_time_before"] = last_modified_time_before
    if status_equals is not None:
        input_["status_equals"] = status_equals

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