sagemaker.core.experiments.experiment#
Contains the SageMaker Experiment class.
Classes
|
An Amazon SageMaker experiment, which is a collection of related trials. |
- class sagemaker.core.experiments.experiment.Experiment(sagemaker_session=None, **kwargs)[source]#
Bases:
RecordAn Amazon SageMaker experiment, which is a collection of related trials.
New experiments are created by calling experiments.experiment.Experiment.create. Existing experiments can be reloaded by calling experiments.experiment.Experiment.load.
- experiment_name#
The name of the experiment. The name must be unique within an account.
- Type:
str
- display_name#
Name of the experiment that will appear in UI, such as SageMaker Studio.
- Type:
str
- description#
A description of the experiment.
- Type:
str
- tags#
A list of tags to associate with the experiment.
- Type:
List[Dict[str, str]]
- classmethod create(experiment_name, display_name=None, description=None, tags=None, sagemaker_session=None)[source]#
Create a new experiment in SageMaker and return an Experiment object.
- Parameters:
experiment_name – (str): Name of the experiment. Must be unique. Required.
display_name – (str): Name of the experiment that will appear in UI, such as SageMaker Studio (default: None).
description – (str): Description of the experiment (default: None).
sagemaker_session (sagemaker.core.helper.session_helper.Session) – Session object which manages interactions with Amazon SageMaker APIs and any other AWS services needed. If not specified, one is created using the default AWS configuration chain.
tags (Optional[Tags]) – A list of tags to associate with the experiment (default: None).
- Returns:
A SageMaker Experiment object
- Return type:
- delete()[source]#
Delete this Experiment from SageMaker.
Deleting an Experiment does not delete associated Trials and their Trial Components. It requires that each Trial in the Experiment is first deleted.
- Returns:
Delete experiment API response.
- Return type:
dict
- description = None#
- display_name = None#
- experiment_name = None#
- list_trials(created_before=None, created_after=None, sort_by=None, sort_order=None)[source]#
List trials in this experiment matching the specified criteria.
- Parameters:
created_before (datetime.datetime) – Return trials created before this instant (default: None).
created_after (datetime.datetime) – Return trials created after this instant (default: None).
sort_by (str) – Which property to sort results by. One of ‘Name’, ‘CreationTime’ (default: None).
sort_order (str) – One of ‘Ascending’, or ‘Descending’ (default: None).
- Returns:
An iterator over trials matching the criteria.
- Return type:
collections.Iterator[experiments._api_types.TrialSummary]
- classmethod load(experiment_name, sagemaker_session=None)[source]#
Load an existing experiment and return an Experiment object representing it.
- Parameters:
experiment_name – (str): Name of the experiment
sagemaker_session (sagemaker.core.helper.session_helper.Session) – Session object which manages interactions with Amazon SageMaker APIs and any other AWS services needed. If not specified, one is created using the default AWS configuration chain.
- Returns:
A SageMaker Experiment object
- Return type:
- save()[source]#
Save the state of this Experiment to SageMaker.
- Returns:
Update experiment API response.
- Return type:
dict
- tags = None#