Skip to main content

trials

Creates, updates, deletes, gets or lists a trials resource.

Overview

Nametrials
TypeResource
Idaws.sagemaker.trials

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_byobjectInformation about the user who created or modified a SageMaker resource.
creation_timestring (date-time)When the trial was created.
display_namestringThe name of the trial as displayed. If DisplayName isn't specified, TrialName is displayed. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}</code>)
experiment_namestringThe name of the experiment the trial is part of. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}</code>)
last_modified_byobjectInformation about the user who created or modified a SageMaker resource.
last_modified_timestring (date-time)When the trial was last modified.
metadata_propertiesobjectMetadata properties of the tracking entity, trial, or trial component.
sourceobjectThe Amazon Resource Name (ARN) of the source and, optionally, the job type.
trial_arnstringThe Amazon Resource Name (ARN) of the trial. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:experiment-trial/.*</code>)
trial_namestringThe name of the trial. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_trialselectregionProvides a list of a trial's properties.
list_trialsselectregionLists the trials in your account. Specify an experiment name to limit the list to the trials that are part of that experiment. Specify a trial component name to limit the list to the trials that associated with that trial component. The list can be filtered to show only trials that were created in a specific time range. The list can be sorted by trial name or creation time.
create_trialinsertregion, TrialName, ExperimentNameCreates an SageMaker trial. A trial is a set of steps called trial components that produce a machine learning model. A trial is part of a single SageMaker experiment. 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 a trial and then use the Search API to search for the tags. To get a list of all your trials, call the ListTrials API. To view a trial's properties, call the DescribeTrial API. To create a trial component, call the CreateTrialComponent API.
update_trialupdateregion, TrialNameUpdates the display name of a trial.
delete_trialdeleteregionDeletes the specified trial. All trial components that make up the trial must be deleted first. Use the DescribeTrialComponent API to get the list of trial components.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Provides a list of a trial's properties.

SELECT
created_by,
creation_time,
display_name,
experiment_name,
last_modified_by,
last_modified_time,
metadata_properties,
source,
trial_arn,
trial_name
FROM aws.sagemaker.trials
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an SageMaker trial. A trial is a set of steps called trial components that produce a machine learning model. A trial is part of a single SageMaker experiment. 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 a trial and then use the Search API to search for the tags. To get a list of all your trials, call the ListTrials API. To view a trial's properties, call the DescribeTrial API. To create a trial component, call the CreateTrialComponent API.

INSERT INTO aws.sagemaker.trials (
TrialName,
DisplayName,
ExperimentName,
MetadataProperties,
Tags,
region
)
SELECT
'{{ TrialName }}' /* required */,
'{{ DisplayName }}',
'{{ ExperimentName }}' /* required */,
'{{ MetadataProperties }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
trial_arn
;

UPDATE examples

Updates the display name of a trial.

UPDATE aws.sagemaker.trials
SET
TrialName = '{{ TrialName }}',
DisplayName = '{{ DisplayName }}'
WHERE
region = '{{ region }}' --required
AND TrialName = '{{ TrialName }}' --required
RETURNING
trial_arn;

DELETE examples

Deletes the specified trial. All trial components that make up the trial must be deleted first. Use the DescribeTrialComponent API to get the list of trial components.

DELETE FROM aws.sagemaker.trials
WHERE region = '{{ region }}' --required
;