Error using 'MultiRecord' in batch transform
Hi, I am running batch transform on Sagemaker using BERT model, and my input file is json lines format. If I select ‘MultiRecord’ in ‘batchStrategy’, It gives the following error:“code”: 400,“type”: “InternalServerException”,“message”: Extra data: line 2 column 1 (char 296)"How could I modify the inference.py or input file format or the batch transform code to fix this error? Any suggestion is welcome.Thanks in advance!Xiao
2022-05-24T06:54:52Z
You could uselocal_modeto develop locally and see what you receive as inputs when working withMultiRecrod.Here is an example on how you can use local mode for regular endpoints:amazon-sagemaker-local-mode/pytorch_script_mode_local_model_inference.py at 84b08fd079cb810e0aa6059ecc75bae6f7f3f13d · aws-samples/amazon-sagemaker-local-mode · GitHubBut this should work for batch transform as well →instance_type='local'and local session.AFAIK you will receive an array of “inputs” as data and not a dict anymore.
2022-05-29T08:49:11Z
xiaocbDid you manage to solve this issue?I am experiencing the same problem.Thanks