SageMakerCreateTrainingJobJsonataProps

class aws_cdk.aws_stepfunctions_tasks.SageMakerCreateTrainingJobJsonataProps(*, comment=None, query_language=None, state_name=None, credentials=None, heartbeat=None, heartbeat_timeout=None, integration_pattern=None, task_timeout=None, timeout=None, assign=None, outputs=None, algorithm_specification, output_data_config, training_job_name, enable_network_isolation=None, environment=None, hyperparameters=None, input_data_config=None, resource_config=None, role=None, stopping_condition=None, tags=None, vpc_config=None)

Bases: TaskStateJsonataBaseProps

Properties for creating an Amazon SageMaker training job using JSONata.

Parameters:
  • comment (Optional[str]) – A comment describing this state. Default: No comment

  • query_language (Optional[QueryLanguage]) – The name of the query language used by the state. If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field. Default: - JSONPath

  • state_name (Optional[str]) – Optional name for this state. Default: - The construct ID will be used as state name

  • credentials (Union[Credentials, Dict[str, Any], None]) – Credentials for an IAM Role that the State Machine assumes for executing the task. This enables cross-account resource invocations. Default: - None (Task is executed using the State Machine’s execution role)

  • heartbeat (Optional[Duration]) – (deprecated) Timeout for the heartbeat. Default: - None

  • heartbeat_timeout (Optional[Timeout]) – Timeout for the heartbeat. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None

  • integration_pattern (Optional[IntegrationPattern]) – AWS Step Functions integrates with services directly in the Amazon States Language. You can control these AWS services using service integration patterns. Depending on the AWS Service, the Service Integration Pattern availability will vary. Default: - IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

  • task_timeout (Optional[Timeout]) – Timeout for the task. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None

  • timeout (Optional[Duration]) – (deprecated) Timeout for the task. Default: - None

  • assign (Optional[Mapping[str, Any]]) – Workflow variables to store in this step. Using workflow variables, you can store data in a step and retrieve that data in future steps. Default: - Not assign variables

  • outputs (Any) – Used to specify and transform output from the state. When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly. Default: - $states.result or $states.errorOutput

  • algorithm_specification (Union[AlgorithmSpecification, Dict[str, Any]]) – Identifies the training algorithm to use.

  • output_data_config (Union[OutputDataConfig, Dict[str, Any]]) – Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.

  • training_job_name (str) – Training Job Name.

  • enable_network_isolation (Optional[bool]) – Isolates the training container. No inbound or outbound network calls can be made to or from the training container. Default: false

  • environment (Optional[Mapping[str, str]]) – Environment variables to set in the Docker container. Default: - No environment variables

  • hyperparameters (Optional[Mapping[str, Any]]) – Algorithm-specific parameters that influence the quality of the model. Set hyperparameters before you start the learning process. For a list of hyperparameters provided by Amazon SageMaker Default: - No hyperparameters

  • input_data_config (Optional[Sequence[Union[Channel, Dict[str, Any]]]]) – Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored. Default: - No inputDataConfig

  • resource_config (Union[ResourceConfig, Dict[str, Any], None]) – Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training. Default: - 1 instance of EC2 M4.XLarge with 10GB volume

  • role (Optional[IRole]) – Role for the Training Job. The role must be granted all necessary permissions for the SageMaker training job to be able to operate. See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms Default: - a role will be created.

  • stopping_condition (Union[StoppingCondition, Dict[str, Any], None]) – Sets a time limit for training. Default: - max runtime of 1 hour

  • tags (Optional[Mapping[str, str]]) – Tags to be applied to the train job. Default: - No tags

  • vpc_config (Union[VpcConfig, Dict[str, Any], None]) – Specifies the VPC that you want your training job to connect to. Default: - No VPC

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_iam as iam
from aws_cdk import aws_kms as kms
from aws_cdk import aws_stepfunctions as stepfunctions
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

# assign: Any
# docker_image: stepfunctions_tasks.DockerImage
# hyperparameters: Any
# instance_type: ec2.InstanceType
# key: kms.Key
# outputs: Any
# role: iam.Role
# s3_location: stepfunctions_tasks.S3Location
# size: cdk.Size
# subnet: ec2.Subnet
# subnet_filter: ec2.SubnetFilter
# task_role: stepfunctions.TaskRole
# timeout: stepfunctions.Timeout
# vpc: ec2.Vpc

sage_maker_create_training_job_jsonata_props = stepfunctions_tasks.SageMakerCreateTrainingJobJsonataProps(
    algorithm_specification=stepfunctions_tasks.AlgorithmSpecification(
        algorithm_name="algorithmName",
        metric_definitions=[stepfunctions_tasks.MetricDefinition(
            name="name",
            regex="regex"
        )],
        training_image=docker_image,
        training_input_mode=stepfunctions_tasks.InputMode.PIPE
    ),
    output_data_config=stepfunctions_tasks.OutputDataConfig(
        s3_output_location=s3_location,

        # the properties below are optional
        encryption_key=key
    ),
    training_job_name="trainingJobName",

    # the properties below are optional
    assign={
        "assign_key": assign
    },
    comment="comment",
    credentials=stepfunctions.Credentials(
        role=task_role
    ),
    enable_network_isolation=False,
    environment={
        "environment_key": "environment"
    },
    heartbeat=cdk.Duration.minutes(30),
    heartbeat_timeout=timeout,
    hyperparameters={
        "hyperparameters_key": hyperparameters
    },
    input_data_config=[stepfunctions_tasks.Channel(
        channel_name="channelName",
        data_source=stepfunctions_tasks.DataSource(
            s3_data_source=stepfunctions_tasks.S3DataSource(
                s3_location=s3_location,

                # the properties below are optional
                attribute_names=["attributeNames"],
                s3_data_distribution_type=stepfunctions_tasks.S3DataDistributionType.FULLY_REPLICATED,
                s3_data_type=stepfunctions_tasks.S3DataType.MANIFEST_FILE
            )
        ),

        # the properties below are optional
        compression_type=stepfunctions_tasks.CompressionType.NONE,
        content_type="contentType",
        input_mode=stepfunctions_tasks.InputMode.PIPE,
        record_wrapper_type=stepfunctions_tasks.RecordWrapperType.NONE,
        shuffle_config=stepfunctions_tasks.ShuffleConfig(
            seed=123
        )
    )],
    integration_pattern=stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
    outputs=outputs,
    query_language=stepfunctions.QueryLanguage.JSON_PATH,
    resource_config=stepfunctions_tasks.ResourceConfig(
        instance_count=123,
        instance_type=instance_type,
        volume_size=size,

        # the properties below are optional
        volume_encryption_key=key
    ),
    role=role,
    state_name="stateName",
    stopping_condition=stepfunctions_tasks.StoppingCondition(
        max_runtime=cdk.Duration.minutes(30)
    ),
    tags={
        "tags_key": "tags"
    },
    task_timeout=timeout,
    timeout=cdk.Duration.minutes(30),
    vpc_config=stepfunctions_tasks.VpcConfig(
        vpc=vpc,

        # the properties below are optional
        subnets=ec2.SubnetSelection(
            availability_zones=["availabilityZones"],
            one_per_az=False,
            subnet_filters=[subnet_filter],
            subnet_group_name="subnetGroupName",
            subnets=[subnet],
            subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
        )
    )
)

Attributes

algorithm_specification

Identifies the training algorithm to use.

assign

Workflow variables to store in this step.

Using workflow variables, you can store data in a step and retrieve that data in future steps.

Default:
  • Not assign variables

See:

https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html

comment

A comment describing this state.

Default:

No comment

credentials

Credentials for an IAM Role that the State Machine assumes for executing the task.

This enables cross-account resource invocations.

Default:
  • None (Task is executed using the State Machine’s execution role)

See:

https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html

enable_network_isolation

Isolates the training container.

No inbound or outbound network calls can be made to or from the training container.

Default:

false

environment

Environment variables to set in the Docker container.

Default:
  • No environment variables

heartbeat

(deprecated) Timeout for the heartbeat.

Default:
  • None

Deprecated:

use heartbeatTimeout

Stability:

deprecated

heartbeat_timeout

Timeout for the heartbeat.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

Default:
  • None

hyperparameters

Algorithm-specific parameters that influence the quality of the model.

Set hyperparameters before you start the learning process. For a list of hyperparameters provided by Amazon SageMaker

Default:
  • No hyperparameters

See:

https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html

input_data_config

Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored.

Default:
  • No inputDataConfig

integration_pattern

AWS Step Functions integrates with services directly in the Amazon States Language.

You can control these AWS services using service integration patterns.

Depending on the AWS Service, the Service Integration Pattern availability will vary.

Default:

  • IntegrationPattern.REQUEST_RESPONSE for most tasks.

IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

See:

https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html

output_data_config

Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.

outputs

Used to specify and transform output from the state.

When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.

Default:
  • $states.result or $states.errorOutput

See:

https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html

query_language

The name of the query language used by the state.

If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.

Default:
  • JSONPath

resource_config

Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.

Default:
  • 1 instance of EC2 M4.XLarge with 10GB volume

role

Role for the Training Job.

The role must be granted all necessary permissions for the SageMaker training job to be able to operate.

See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms

Default:
  • a role will be created.

state_name

Optional name for this state.

Default:
  • The construct ID will be used as state name

stopping_condition

Sets a time limit for training.

Default:
  • max runtime of 1 hour

tags

Tags to be applied to the train job.

Default:
  • No tags

task_timeout

Timeout for the task.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

Default:
  • None

timeout

(deprecated) Timeout for the task.

Default:
  • None

Deprecated:

use taskTimeout

Stability:

deprecated

training_job_name

Training Job Name.

vpc_config

Specifies the VPC that you want your training job to connect to.

Default:
  • No VPC