AWS Sagemaker - 训练通道为空或小批量大小过大

AWS Sagemaker - Either the training channel is empty or the mini-batch size is too high

我正在尝试在 Sagemaker 中训练线性学习器模型。我的训练集是 422 行,在 AWS S3 上分成 4 个文件。我设置的小批量大小是 50。

我在 Sagemaker 中不断收到此错误。

Customer Error: No training data processed. Either the training channel is empty or the mini-batch size is too high. Verify that training data contains non-empty files and the mini-batch size is less than the number of records per training host.

我正在使用这个 InputDataConfig

InputDataConfig=[
            {
                'ChannelName': 'train',
                'DataSource': {
                    'S3DataSource': {
                        'S3DataType': 'S3Prefix',
                        'S3Uri': 's3://MY_S3_BUCKET/REST_OF_PREFIX/exported/',
                        'S3DataDistributionType': 'FullyReplicated'
                    }
                },
                'ContentType': 'text/csv',
                'CompressionType': 'Gzip'
            }
        ],

我不确定我做错了什么。我尝试将记录数增加到 5547495,分为 6 个文件。同样的错误。这让我觉得配置本身以某种方式丢失了一些东西。因此,似乎认为培训渠道不存在。我尝试将 'train' 更改为 'training',因为错误消息就是这么说的。但后来我得到了

Customer Error: Unable to initialize the algorithm. Failed to validate input data configuration. (caused by ValidationError)

Caused by: {u'training': {u'TrainingInputMode': u'Pipe', u'ContentType': u'text/csv', u'RecordWrapperType': u'None', u'S3DistributionType': u'FullyReplicated'}} is not valid under any of the given schemas

我回去训练了,因为这似乎是需要的。但是我做错了什么?

找到问题了。 CompressionType 被提及为 'Gzip' 但我已将实际文件更改为在导出时不压缩。我一改成'None',训练就很顺利了。