sagemaker.local bug when inputs are binary files #4996
Labels
component: pysdk-team
Related to SageMaker Python SDK Core Issues
contributions welcome
type: bug
type: question
Describe the bug
Hello, I think I encountered a bug in sagemaker.local. I'm trying to test a batch transform with images as input, but I get the following error even before I reach the input_fn of my custom inference script
I am not using a splitter (splitter type is None), as it's not necessary on images.
I believe the problem is in line 343 of MultRecordStrategy class
sagemaker-python-sdk/src/sagemaker/local/data.py
Lines 326 to 352 in ae3cc1c
We can see that the
buffer
variable is assumed to be a string, which means it's assumed that thefile
variable would not refer to a binary object, which should be possible.To reproduce
Just run local batch transform with a single image as input. The model doesn't really matter I think, it will fail before any prediction or interaction between data and the model is made.
Expected behavior
I would expect the buffer to be sensitive to weather the file is a string like json or csv, or a binary type like png.
Screenshots or logs
See above.
System information
A description of your system. Please provide:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: