Skip to content

stop_hyper_parameter_tuning_job async

stop_hyper_parameter_tuning_job(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    hyper_parameter_tuning_job_name: Optional[HyperParameterTuningJobName] = None,
) -> None

Stops a running hyperparameter tuning job and all running training jobs that the tuning job launched.

All model artifacts output from the training jobs are stored in Amazon Simple Storage Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs are still available in CloudWatch. After the tuning job moves to the Stopped state, it releases all reserved resources for the tuning job.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def stop_hyper_parameter_tuning_job(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    hyper_parameter_tuning_job_name: Optional[
        "capo_sagemaker.types.hyper_parameter_tuning_job_name.HyperParameterTuningJobName"
    ] = None,
) -> None:
    """<p>Stops a running hyperparameter tuning job and all running training jobs that the tuning job launched.</p> <p>All model artifacts output from the training jobs are stored in Amazon Simple Storage Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs are still available in CloudWatch. After the tuning job moves to the <code>Stopped</code> state, it releases all reserved resources for the tuning job.</p>

    Args:
        hyper_parameter_tuning_job_name: <p>The name of the tuning job to stop.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.stop_hyper_parameter_tuning_job_request.StopHyperParameterTuningJobRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.stop_hyper_parameter_tuning_job

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.stop_hyper_parameter_tuning_job.async_stop_hyper_parameter_tuning_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopHyperParameterTuningJob")
    )
    input_: capo_sagemaker.types.stop_hyper_parameter_tuning_job_request.StopHyperParameterTuningJobRequest = {}
    if hyper_parameter_tuning_job_name is not None:
        input_["hyper_parameter_tuning_job_name"] = hyper_parameter_tuning_job_name

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output