diff --git a/src/sagemaker/local/entities.py b/src/sagemaker/local/entities.py index eef906eecd..b318cccbf0 100644 --- a/src/sagemaker/local/entities.py +++ b/src/sagemaker/local/entities.py @@ -356,7 +356,7 @@ def _perform_batch_inference(self, input_data, output_data, **kwargs): ) response_body = response["Body"] - data = response_body.read().strip() + data = response_body.read() response_body.close() f.write(data) if "AssembleWith" in output_data and output_data["AssembleWith"] == "Line":