CreateTrialComponent - Amazon SageMaker

CreateTrialComponent

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 AWS 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.

Request Syntax

{ "DisplayName": "string", "EndTime": number, "InputArtifacts": { "string" : { "MediaType": "string", "Value": "string" } }, "MetadataProperties": { "CommitId": "string", "GeneratedBy": "string", "ProjectId": "string", "Repository": "string" }, "OutputArtifacts": { "string" : { "MediaType": "string", "Value": "string" } }, "Parameters": { "string" : { "NumberValue": number, "StringValue": "string" } }, "StartTime": number, "Status": { "Message": "string", "PrimaryStatus": "string" }, "Tags": [ { "Key": "string", "Value": "string" } ], "TrialComponentName": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

DisplayName

The name of the component as displayed. The name doesn't need to be unique. If DisplayName isn't specified, TrialComponentName is displayed.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 120.

Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}

Required: No

EndTime

When the component ended.

Type: Timestamp

Required: No

InputArtifacts

The input artifacts for the component. Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types.

Type: String to TrialComponentArtifact object map

Map Entries: Maximum number of 60 items.

Key Length Constraints: Maximum length of 128.

Key Pattern: .*

Required: No

MetadataProperties

Metadata properties of the tracking entity, trial, or trial component.

Type: MetadataProperties object

Required: No

OutputArtifacts

The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and images.

Type: String to TrialComponentArtifact object map

Map Entries: Maximum number of 60 items.

Key Length Constraints: Maximum length of 128.

Key Pattern: .*

Required: No

Parameters

The hyperparameters for the component.

Type: String to TrialComponentParameterValue object map

Map Entries: Maximum number of 300 items.

Key Length Constraints: Maximum length of 320.

Key Pattern: .*

Required: No

StartTime

When the component started.

Type: Timestamp

Required: No

Status

The status of the component. States include:

  • InProgress

  • Completed

  • Failed

Type: TrialComponentStatus object

Required: No

Tags

A list of tags to associate with the component. You can use Search API to search on the tags.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Required: No

TrialComponentName

The name of the component. The name must be unique in your AWS account and is not case-sensitive.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 120.

Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}

Required: Yes

Response Syntax

{ "TrialComponentArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

TrialComponentArn

The Amazon Resource Name (ARN) of the trial component.

Type: String

Length Constraints: Maximum length of 256.

Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:experiment-trial-component/.*

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceLimitExceeded

You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: