AWS SageMaker 中 mxnet 线性学习器的正确输入是什么?

What is correct input for mxnet's linear learner in AWS SageMaker?

我正在尝试使用 MXNet 在 AWS SageMaker 中创建一个简单的线性学习器。我以前从未使用过 SageMaker 或 MXNet。拟合模型给出如下运行时错误并关闭实例:

UnexpectedStatusException: Error for Training job linear-learner-2020-02-11-06-13-22-712: Failed. Reason: ClientError: Unable to read data channel 'train'. Requested content-type is 'application/x-recordio-protobuf'. Please verify the data matches the requested content-type. (caused by MXNetError)

我认为数据应该在作为训练数据传递之前转换为 protobuf 格式。有人可以向我解释 MXNet 模型的正确格式是什么吗?将简单数据帧转换为 protobuf 的最佳方法是什么?

This end-to-end demo 显示在 pandas 数据帧中预处理输入数据并使用 SDK 转换为 protobuf 的线性学习器的用法。但请注意:

  • 不需要使用protobuf,也可以在文件的第一列用target变量传csv数据,如indicated here.
  • 无需了解 MXNet 即可使用 SageMaker 线性学习器,只需使用您选择的 SDK,将数据导入 S3,并编排训练和推理:)