[英]how to structure input/formats for batch inference in sagemaker?
example provided in the aws documentation, https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html , states that the input csv can be structured like a sample below. aws 文档https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html中提供的示例说明输入 csv 的结构可以像下面的示例一样。 I noticed for batch jobs in sagemaker, it can accept json as well.
我注意到 sagemaker 中的批处理作业,它也可以接受 json。 how to structure the json, does each record need to in a single line as shown in a csv example or can it be multiline?
如何构建 json,每条记录是否需要像 csv 示例中所示的那样在单行中,还是可以是多行?
Record1-Attribute1, Record1-Attribute2, Record1-Attribute3, ..., Record1-AttributeM
...
It is recommended to make use of JSON Lines
(ie each JSON to be on a single line).建议使用
JSON Lines
(即每个 JSON 在一条线上)。 You can then set BatchStrategy to MultiRecord and SplitType
to Line
.然后,您可以将 BatchStrategy 设置为 MultiRecord 并将
SplitType
设置为Line
。 Batch Transform can then fit as many records in a mini-batch within the MaxPayloadInMB
limit.然后,批量转换可以在
MaxPayloadInMB
限制内将尽可能多的记录放入小批量中。
Kindly see the CreateTransformJob
API for more information.请参阅
CreateTransformJob
API 了解更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.