Channel

class aws_cdk.aws_stepfunctions_tasks.Channel(*, channel_name, data_source, compression_type=None, content_type=None, input_mode=None, record_wrapper_type=None, shuffle_config=None)

Bases: object

Describes the training, validation or test dataset and the Amazon S3 location where it is stored.

Parameters:
  • channel_name (str) – Name of the channel.

  • data_source (Union[DataSource, Dict[str, Any]]) – Location of the channel data.

  • compression_type (Optional[CompressionType]) – Compression type if training data is compressed. Default: - None

  • content_type (Optional[str]) – The MIME type of the data. Default: - None

  • input_mode (Optional[InputMode]) – Input mode to use for the data channel in a training job. Default: - None

  • record_wrapper_type (Optional[RecordWrapperType]) – Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don’t need to set this attribute. Default: - None

  • shuffle_config (Union[ShuffleConfig, Dict[str, Any], None]) – Shuffle config option for input data in a channel. Default: - None

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.aws_stepfunctions_tasks as stepfunctions_tasks

# s3_location: stepfunctions_tasks.S3Location

channel = 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
    )
)

Attributes

channel_name

Name of the channel.

compression_type

Compression type if training data is compressed.

Default:
  • None

content_type

The MIME type of the data.

Default:
  • None

data_source

Location of the channel data.

input_mode

Input mode to use for the data channel in a training job.

Default:
  • None

record_wrapper_type

Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format.

In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don’t need to set this attribute.

Default:
  • None

shuffle_config

Shuffle config option for input data in a channel.

Default:
  • None