

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 用于管道模式训练的增补清单文件格式
<a name="augmented-manifest-stream"></a>

通过增强清单格式，您可以使用文件在管道模式下进行训练，而无需创建 RecordIO 文件。您需要将训练通道和验证通道指定为 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html) 请求的 `InputDataConfig` 参数的值。只有使用管道输入模式的通道才支持增强清单文件。对于每个通道，数据提取自其增强清单文件，并通过通道的指定管道（按顺序）流式传输到算法。管道模式使用先进先出 (FIFO) 方法，因此记录按照排队的顺序处理。有关管道输入模式的信息，请参阅[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Channel.html#SageMaker-Type-Channel-InputMode](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Channel.html#SageMaker-Type-Channel-InputMode)。

具有 `"-ref"` 后缀的属性名称指向预先格式化的二进制数据。在某些情况下，算法知道如何解析数据。在另一些情况下，您可能需要包装数据，针对算法来分隔记录。如果算法与 [RecordIO 格式数据](https://mxnet.apache.org/api/architecture/note_data_loading#data-format)兼容，请为 `RecordWrapperType` 指定 `RecordIO` 以解决此问题。如果算法不与 `RecordIO` 格式兼容，请为 `RecordWrapperType` 指定 `None` 并确保针对您的算法正确解析了数据。

使用 `["image-ref", "is-a-cat"]` 示例，如果您使用 RecordIO 包装，则将以下数据流发送到队列：

`recordio_formatted(s3://amzn-s3-demo-bucket/foo/image1.jpg)recordio_formatted("1")recordio_formatted(s3://amzn-s3-demo-bucket/bar/image2.jpg)recordio_formatted("0")`

未使用 RecordIO 格式包装的图像，将通过对应的 `is-a-cat` 属性值流式处理为一个记录。由于算法可能没有正确的分隔图像和属性，这可能会导致问题。有关使用增强清单文件进行图像分类的详细信息，请参阅[使用增强清单图像格式训练](https://docs.aws.amazon.com/sagemaker/latest/dg/image-classification.html#IC-augmented-manifest-training)。

通常使用增强清单文件和管道模式时，EBS 卷的大小限制不适用。这包括原本必须位于 EBS 卷大小限制内的设置，例如 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html#SageMaker-Type-S3DataSource-S3DataDistributionType                 ](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html#SageMaker-Type-S3DataSource-S3DataDistributionType                 )。有关管道模式以及如何使用该模式的更多信息，请参阅[使用您自己的训练算法 – 输入数据配置](your-algorithms-training-algo.html#your-algorithms-training-algo-running-container-inputdataconfig)。