Creates a SageMaker experiment. An experiment is a collection of trials that are observed, compared and evaluated as a group. A trial is a set of steps, called trial components, that produce a machine learning model.
In the Studio UI, trials are referred to as run groups and trial components are referred to as runs.
The goal of an experiment is to determine the components that produce the best model. Multiple trials are performed, each one isolating and measuring the impact of a change to one or more inputs, while keeping the remaining inputs constant.
When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided by the SDK.
You can add tags to experiments, trials, trial components and then use the Search API to search for the tags.
To add a description to an experiment, specify the optional Description parameter. To add a description later, or to change the description, call the UpdateExperiment API.
To get a list of all your experiments, call the ListExperiments API. To view an experiment's properties, call the DescribeExperiment API. To get a list of all the trials associated with an experiment, call the ListTrials API. To create a trial call the CreateTrial API.
Parameters:
-
experiment_name
(Optional[ExperimentEntityName], default:
None
)
–
The name of the experiment. The name must be unique in your Amazon Web Services account and is not case-sensitive.
-
display_name
(Optional[ExperimentEntityName], default:
None
)
–
The name of the experiment as displayed. The name doesn't need to be unique. If you don't specify DisplayName, the value in ExperimentName is displayed.
-
description
(Optional[ExperimentDescription], default:
None
)
–
The description of the experiment.
-
tags
(Optional[TagList], default:
None
)
–
A list of tags to associate with the experiment. You can use Search API to search on the tags.
Raises:
-
ResourceLimitExceeded
–
You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.
-
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 create_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,
tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
) -> "capo_sagemaker.types.create_experiment_response.CreateExperimentResponse":
"""<p>Creates a SageMaker <i>experiment</i>. An experiment is a collection of <i>trials</i> that are observed, compared and evaluated as a group. A trial is a set of steps, called <i>trial components</i>, that produce a machine learning model.</p> <note> <p>In the Studio UI, trials are referred to as <i>run groups</i> and trial components are referred to as <i>runs</i>.</p> </note> <p>The goal of an experiment is to determine the components that produce the best model. Multiple trials are performed, each one isolating and measuring the impact of a change to one or more inputs, while keeping the remaining inputs constant.</p> <p>When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided by the SDK.</p> <p>You can add tags to experiments, trials, trial components and then use the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html">Search</a> API to search for the tags.</p> <p>To add a description to an experiment, specify the optional <code>Description</code> parameter. To add a description later, or to change the description, call the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateExperiment.html">UpdateExperiment</a> API.</p> <p>To get a list of all your experiments, call the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListExperiments.html">ListExperiments</a> API. To view an experiment's properties, call the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeExperiment.html">DescribeExperiment</a> API. To get a list of all the trials associated with an experiment, call the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTrials.html">ListTrials</a> API. To create a trial call the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrial.html">CreateTrial</a> API.</p>
Args:
experiment_name: <p>The name of the experiment. The name must be unique in your Amazon Web Services account and is not case-sensitive.</p>
display_name: <p>The name of the experiment as displayed. The name doesn't need to be unique. If you don't specify <code>DisplayName</code>, the value in <code>ExperimentName</code> is displayed.</p>
description: <p>The description of the experiment.</p>
tags: <p>A list of tags to associate with the experiment. You can use <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html">Search</a> API to search on the tags.</p>
Raises:
capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sagemaker.types.create_experiment_request.CreateExperimentRequest]",
) -> AsyncOperationResponse[
"capo_sagemaker.types.create_experiment_response.CreateExperimentResponse"
]:
import capo_sagemaker._operations.sage_maker.create_experiment
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.create_experiment.async_create_experiment(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateExperiment")
)
input_: capo_sagemaker.types.create_experiment_request.CreateExperimentRequest = {}
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
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|