[英]how to structure input/formats for batch inference in sagemaker?
aws 文档https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html中提供的示例说明输入 csv 的结构可以像下面的示例一样。 我注意到 sagemaker 中的批处理作业,它也可以接受 json。 如何构建 json,每条记录是否需要像 csv 示例中所示的那样在单行中,还是可以是多行?
Record1-Attribute1, Record1-Attribute2, Record1-Attribute3, ..., Record1-AttributeM
...
建议使用JSON Lines
(即每个 JSON 在一条线上)。 然后,您可以将 BatchStrategy 设置为 MultiRecord 并将SplitType
设置为Line
。 然后,批量转换可以在MaxPayloadInMB
限制内将尽可能多的记录放入小批量中。
请参阅CreateTransformJob
API 了解更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.