Skip to content

update_experiment async

update_experiment(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    experiment_name: Optional[ExperimentEntityName] = None,
    display_name: Optional[ExperimentEntityName] = None,
    description: Optional[ExperimentDescription] = None,
) -> UpdateExperimentResponse

Adds, updates, or removes the description of an experiment. Updates the display name of an experiment.

Parameters:

Raises:

  • ConflictException –

    There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.

  • ResourceNotFound –

    Resource being access is not found.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def update_experiment(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    experiment_name: Optional[
        "capo_sagemaker.types.experiment_entity_name.ExperimentEntityName"
    ] = None,
    display_name: Optional[
        "capo_sagemaker.types.experiment_entity_name.ExperimentEntityName"
    ] = None,
    description: Optional[
        "capo_sagemaker.types.experiment_description.ExperimentDescription"
    ] = None,
) -> "capo_sagemaker.types.update_experiment_response.UpdateExperimentResponse":
    """<p>Adds, updates, or removes the description of an experiment. Updates the display name of an experiment.</p>

    Args:
        experiment_name: <p>The name of the experiment to update.</p>
        display_name: <p>The name of the experiment as displayed. The name doesn't need to be unique. If <code>DisplayName</code> isn't specified, <code>ExperimentName</code> is displayed.</p>
        description: <p>The description of the experiment.</p>

    Raises:
        capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
        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.update_experiment_request.UpdateExperimentRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.update_experiment_response.UpdateExperimentResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.update_experiment

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateExperiment")
    )
    input_: capo_sagemaker.types.update_experiment_request.UpdateExperimentRequest = {}
    if experiment_name is not None:
        input_["experiment_name"] = experiment_name
    if display_name is not None:
        input_["display_name"] = display_name
    if description is not None:
        input_["description"] = description

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