Skip to content
v2.277.0

TrainingSpecificationProperty Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const trainingSpecificationProperty: sagemaker.CfnAlgorithm.TrainingSpecificationProperty = {
  supportedTrainingInstanceTypes: ['supportedTrainingInstanceTypes'],
  trainingChannels: [{
    name: 'name',
    supportedContentTypes: ['supportedContentTypes'],
    supportedInputModes: ['supportedInputModes'],

    // the properties below are optional
    description: 'description',
    isRequired: false,
    supportedCompressionTypes: ['supportedCompressionTypes'],
  }],
  trainingImage: 'trainingImage',

  // the properties below are optional
  metricDefinitions: [{
    name: 'name',
    regex: 'regex',
  }],
  supportedHyperParameters: [{
    name: 'name',
    type: 'type',

    // the properties below are optional
    defaultValue: 'defaultValue',
    description: 'description',
    isRequired: false,
    isTunable: false,
    range: {
      categoricalParameterRangeSpecification: {
        values: ['values'],
      },
      continuousParameterRangeSpecification: {
        maxValue: 'maxValue',
        minValue: 'minValue',
      },
      integerParameterRangeSpecification: {
        maxValue: 'maxValue',
        minValue: 'minValue',
      },
    },
  }],
  supportedTuningJobObjectiveMetrics: [{
    metricName: 'metricName',
    type: 'type',
  }],
  supportsDistributedTraining: false,
  trainingImageDigest: 'trainingImageDigest',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

training_specification_property = sagemaker.CfnAlgorithm.TrainingSpecificationProperty(
    supported_training_instance_types=["supportedTrainingInstanceTypes"],
    training_channels=[sagemaker.CfnAlgorithm.ChannelSpecificationProperty(
        name="name",
        supported_content_types=["supportedContentTypes"],
        supported_input_modes=["supportedInputModes"],

        # the properties below are optional
        description="description",
        is_required=False,
        supported_compression_types=["supportedCompressionTypes"]
    )],
    training_image="trainingImage",

    # the properties below are optional
    metric_definitions=[sagemaker.CfnAlgorithm.MetricDefinitionProperty(
        name="name",
        regex="regex"
    )],
    supported_hyper_parameters=[sagemaker.CfnAlgorithm.HyperParameterSpecificationProperty(
        name="name",
        type="type",

        # the properties below are optional
        default_value="defaultValue",
        description="description",
        is_required=False,
        is_tunable=False,
        range=sagemaker.CfnAlgorithm.ParameterRangeProperty(
            categorical_parameter_range_specification=sagemaker.CfnAlgorithm.CategoricalParameterRangeSpecificationProperty(
                values=["values"]
            ),
            continuous_parameter_range_specification=sagemaker.CfnAlgorithm.ContinuousParameterRangeSpecificationProperty(
                max_value="maxValue",
                min_value="minValue"
            ),
            integer_parameter_range_specification=sagemaker.CfnAlgorithm.IntegerParameterRangeSpecificationProperty(
                max_value="maxValue",
                min_value="minValue"
            )
        )
    )],
    supported_tuning_job_objective_metrics=[sagemaker.CfnAlgorithm.HyperParameterTuningJobObjectiveProperty(
        metric_name="metricName",
        type="type"
    )],
    supports_distributed_training=False,
    training_image_digest="trainingImageDigest"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

TrainingSpecificationProperty trainingSpecificationProperty = TrainingSpecificationProperty.builder()
        .supportedTrainingInstanceTypes(List.of("supportedTrainingInstanceTypes"))
        .trainingChannels(List.of(ChannelSpecificationProperty.builder()
                .name("name")
                .supportedContentTypes(List.of("supportedContentTypes"))
                .supportedInputModes(List.of("supportedInputModes"))

                // the properties below are optional
                .description("description")
                .isRequired(false)
                .supportedCompressionTypes(List.of("supportedCompressionTypes"))
                .build()))
        .trainingImage("trainingImage")

        // the properties below are optional
        .metricDefinitions(List.of(MetricDefinitionProperty.builder()
                .name("name")
                .regex("regex")
                .build()))
        .supportedHyperParameters(List.of(HyperParameterSpecificationProperty.builder()
                .name("name")
                .type("type")

                // the properties below are optional
                .defaultValue("defaultValue")
                .description("description")
                .isRequired(false)
                .isTunable(false)
                .range(ParameterRangeProperty.builder()
                        .categoricalParameterRangeSpecification(CategoricalParameterRangeSpecificationProperty.builder()
                                .values(List.of("values"))
                                .build())
                        .continuousParameterRangeSpecification(ContinuousParameterRangeSpecificationProperty.builder()
                                .maxValue("maxValue")
                                .minValue("minValue")
                                .build())
                        .integerParameterRangeSpecification(IntegerParameterRangeSpecificationProperty.builder()
                                .maxValue("maxValue")
                                .minValue("minValue")
                                .build())
                        .build())
                .build()))
        .supportedTuningJobObjectiveMetrics(List.of(HyperParameterTuningJobObjectiveProperty.builder()
                .metricName("metricName")
                .type("type")
                .build()))
        .supportsDistributedTraining(false)
        .trainingImageDigest("trainingImageDigest")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var trainingSpecificationProperty = new TrainingSpecificationProperty {
    SupportedTrainingInstanceTypes = new [] { "supportedTrainingInstanceTypes" },
    TrainingChannels = new [] { new ChannelSpecificationProperty {
        Name = "name",
        SupportedContentTypes = new [] { "supportedContentTypes" },
        SupportedInputModes = new [] { "supportedInputModes" },

        // the properties below are optional
        Description = "description",
        IsRequired = false,
        SupportedCompressionTypes = new [] { "supportedCompressionTypes" }
    } },
    TrainingImage = "trainingImage",

    // the properties below are optional
    MetricDefinitions = new [] { new MetricDefinitionProperty {
        Name = "name",
        Regex = "regex"
    } },
    SupportedHyperParameters = new [] { new HyperParameterSpecificationProperty {
        Name = "name",
        Type = "type",

        // the properties below are optional
        DefaultValue = "defaultValue",
        Description = "description",
        IsRequired = false,
        IsTunable = false,
        Range = new ParameterRangeProperty {
            CategoricalParameterRangeSpecification = new CategoricalParameterRangeSpecificationProperty {
                Values = new [] { "values" }
            },
            ContinuousParameterRangeSpecification = new ContinuousParameterRangeSpecificationProperty {
                MaxValue = "maxValue",
                MinValue = "minValue"
            },
            IntegerParameterRangeSpecification = new IntegerParameterRangeSpecificationProperty {
                MaxValue = "maxValue",
                MinValue = "minValue"
            }
        }
    } },
    SupportedTuningJobObjectiveMetrics = new [] { new HyperParameterTuningJobObjectiveProperty {
        MetricName = "metricName",
        Type = "type"
    } },
    SupportsDistributedTraining = false,
    TrainingImageDigest = "trainingImageDigest"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

trainingSpecificationProperty := &TrainingSpecificationProperty{
	SupportedTrainingInstanceTypes: []*string{
		jsii.String("supportedTrainingInstanceTypes"),
	},
	TrainingChannels: []interface{}{
		&ChannelSpecificationProperty{
			Name: jsii.String("name"),
			SupportedContentTypes: []*string{
				jsii.String("supportedContentTypes"),
			},
			SupportedInputModes: []*string{
				jsii.String("supportedInputModes"),
			},

			// the properties below are optional
			Description: jsii.String("description"),
			IsRequired: jsii.Boolean(false),
			SupportedCompressionTypes: []*string{
				jsii.String("supportedCompressionTypes"),
			},
		},
	},
	TrainingImage: jsii.String("trainingImage"),

	// the properties below are optional
	MetricDefinitions: []interface{}{
		&MetricDefinitionProperty{
			Name: jsii.String("name"),
			Regex: jsii.String("regex"),
		},
	},
	SupportedHyperParameters: []interface{}{
		&HyperParameterSpecificationProperty{
			Name: jsii.String("name"),
			Type: jsii.String("type"),

			// the properties below are optional
			DefaultValue: jsii.String("defaultValue"),
			Description: jsii.String("description"),
			IsRequired: jsii.Boolean(false),
			IsTunable: jsii.Boolean(false),
			Range: &ParameterRangeProperty{
				CategoricalParameterRangeSpecification: &CategoricalParameterRangeSpecificationProperty{
					Values: []*string{
						jsii.String("values"),
					},
				},
				ContinuousParameterRangeSpecification: &ContinuousParameterRangeSpecificationProperty{
					MaxValue: jsii.String("maxValue"),
					MinValue: jsii.String("minValue"),
				},
				IntegerParameterRangeSpecification: &IntegerParameterRangeSpecificationProperty{
					MaxValue: jsii.String("maxValue"),
					MinValue: jsii.String("minValue"),
				},
			},
		},
	},
	SupportedTuningJobObjectiveMetrics: []interface{}{
		&HyperParameterTuningJobObjectiveProperty{
			MetricName: jsii.String("metricName"),
			Type: jsii.String("type"),
		},
	},
	SupportsDistributedTraining: jsii.Boolean(false),
	TrainingImageDigest: jsii.String("trainingImageDigest"),
}

Properties ​

metricDefinitionsoptionalIResolvable | IResolvable | CfnAlgorithm.MetricDefinitionProperty[]metric_definitionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricDefinitionProperty]]]metricDefinitionsoptionalIResolvableMetricDefinitionsoptionalIResolvableMetricDefinitionsoptionalinterface{} #
supportedHyperParametersoptionalIResolvable | IResolvable | CfnAlgorithm.HyperParameterSpecificationProperty[]supported_hyper_parametersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HyperParameterSpecificationProperty]]]supportedHyperParametersoptionalIResolvableSupportedHyperParametersoptionalIResolvableSupportedHyperParametersoptionalinterface{} #
supportedTrainingInstanceTypesstring[]supported_training_instance_typestyping.List[str]supportedTrainingInstanceTypesList<String>SupportedTrainingInstanceTypesstring[]SupportedTrainingInstanceTypes*[]*string required #
supportedTuningJobObjectiveMetricsoptionalIResolvable | IResolvable | CfnAlgorithm.HyperParameterTuningJobObjectiveProperty[]supported_tuning_job_objective_metricsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HyperParameterTuningJobObjectiveProperty]]]supportedTuningJobObjectiveMetricsoptionalIResolvableSupportedTuningJobObjectiveMetricsoptionalIResolvableSupportedTuningJobObjectiveMetricsoptionalinterface{} #
supportsDistributedTrainingoptionalboolean | IResolvablesupports_distributed_trainingoptionaltyping.Union[bool, IResolvable]supportsDistributedTrainingoptionalBooleanSupportsDistributedTrainingoptionalboolSupportsDistributedTrainingoptionalinterface{} #
trainingChannelsIResolvable | IResolvable | CfnAlgorithm.ChannelSpecificationProperty[]training_channelstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ChannelSpecificationProperty]]]trainingChannelsIResolvableTrainingChannelsIResolvableTrainingChannelsinterface{} required #
trainingImagestringtraining_imagestrtrainingImageStringTrainingImagestringTrainingImage*string required #
trainingImageDigestoptionalstringtraining_image_digestoptionalstrtrainingImageDigestoptionalStringTrainingImageDigestoptionalstringTrainingImageDigestoptional*string #