Skip to main content

trial_components

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

Overview

Nametrial_components
TypeResource
Idaws.sagemaker.trial_components

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 component was created.
display_namestringThe name of the component as displayed. If DisplayName isn't specified, TrialComponentName is displayed. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}</code>)
end_timestring (date-time)When the component ended.
input_artifactsobjectThe input artifacts of the component.
last_modified_byobjectInformation about the user who created or modified a SageMaker resource.
last_modified_timestring (date-time)When the component was last modified.
lineage_group_arnstringThe Amazon Resource Name (ARN) of the lineage group. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:lineage-group/.*</code>)
metadata_propertiesobjectMetadata properties of the tracking entity, trial, or trial component.
metricsarrayThe metrics for the component.
output_artifactsobjectThe output artifacts of the component.
parametersobjectThe hyperparameters of the component.
sourceobjectThe Amazon Resource Name (ARN) of the source and, optionally, the job type.
sourcesarrayA list of ARNs and, if applicable, job types for multiple sources of an experiment run.
start_timestring (date-time)When the component started.
statusobjectThe status of the component. States include: InProgress Completed Failed
trial_component_arnstringThe Amazon Resource Name (ARN) of the trial component. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:experiment-trial-component/.*</code>)
trial_component_namestringThe name of the trial component. (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_trial_componentselectregionProvides a list of a trials component's properties.
list_trial_componentsselectregionLists the trial components in your account. You can sort the list by trial component name or creation time. You can filter the list to show only components that were created in a specific time range. You can also filter on one of the following: ExperimentName SourceArn TrialName
create_trial_componentinsertregion, TrialComponentNameCreates a trial component, which is a stage of a machine learning trial. A trial is composed of one or more trial components. A trial component can be used in multiple trials. Trial components include pre-processing jobs, training jobs, and batch transform jobs. 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 component and then use the Search API to search for the tags.
associate_trial_componentupdateregion, TrialComponentName, TrialNameAssociates a trial component with a trial. A trial component can be associated with multiple trials. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.
update_trial_componentupdateregion, TrialComponentNameUpdates one or more properties of a trial component.
delete_trial_componentdeleteregionDeletes the specified trial component. A trial component must be disassociated from all trials before the trial component can be deleted. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.
disassociate_trial_componentexecregion, TrialComponentName, TrialNameDisassociates a trial component from a trial. This doesn't effect other trials the component is associated with. Before you can delete a component, you must disassociate the component from all trials it is associated with. To associate a trial component with a trial, call the AssociateTrialComponent API. To get a list of the trials a component is associated with, use the Search API. Specify ExperimentTrialComponent for the Resource parameter. The list appears in the response under Results.TrialComponent.Parents.

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 trials component's properties.

SELECT
created_by,
creation_time,
display_name,
end_time,
input_artifacts,
last_modified_by,
last_modified_time,
lineage_group_arn,
metadata_properties,
metrics,
output_artifacts,
parameters,
source,
sources,
start_time,
status,
trial_component_arn,
trial_component_name
FROM aws.sagemaker.trial_components
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a trial component, which is a stage of a machine learning trial. A trial is composed of one or more trial components. A trial component can be used in multiple trials. Trial components include pre-processing jobs, training jobs, and batch transform jobs. 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 component and then use the Search API to search for the tags.

INSERT INTO aws.sagemaker.trial_components (
TrialComponentName,
DisplayName,
Status,
StartTime,
EndTime,
Parameters,
InputArtifacts,
OutputArtifacts,
MetadataProperties,
Tags,
region
)
SELECT
'{{ TrialComponentName }}' /* required */,
'{{ DisplayName }}',
'{{ Status }}',
'{{ StartTime }}',
'{{ EndTime }}',
'{{ Parameters }}',
'{{ InputArtifacts }}',
'{{ OutputArtifacts }}',
'{{ MetadataProperties }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
trial_component_arn
;

UPDATE examples

Associates a trial component with a trial. A trial component can be associated with multiple trials. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.

UPDATE aws.sagemaker.trial_components
SET
TrialComponentName = '{{ TrialComponentName }}',
TrialName = '{{ TrialName }}'
WHERE
region = '{{ region }}' --required
AND TrialComponentName = '{{ TrialComponentName }}' --required
AND TrialName = '{{ TrialName }}' --required
RETURNING
trial_arn,
trial_component_arn;

DELETE examples

Deletes the specified trial component. A trial component must be disassociated from all trials before the trial component can be deleted. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.

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

Lifecycle Methods

Disassociates a trial component from a trial. This doesn't effect other trials the component is associated with. Before you can delete a component, you must disassociate the component from all trials it is associated with. To associate a trial component with a trial, call the AssociateTrialComponent API. To get a list of the trials a component is associated with, use the Search API. Specify ExperimentTrialComponent for the Resource parameter. The list appears in the response under Results.TrialComponent.Parents.

EXEC aws.sagemaker.trial_components.disassociate_trial_component
@region='{{ region }}' --required
@@json=
'{
"TrialComponentName": "{{ TrialComponentName }}",
"TrialName": "{{ TrialName }}"
}'
;