1 min read

SageMaker mistakes

SageMaker mistakes
Photo by Thom Milkovic / Unsplash

Its the little things that hurt the most. Yesterday I was working project in the sagemaker-examples repo and it was using a csvserializer from v1 of the library. So I unassummingly updated it to v2 of the serializer. What I missed was that the v2 serializers need to be 'init', i.e.

CSVSerializer() 

# rather that just 
CSVSerializer

from sagemaker.deserializers import JSONDeserializer
from sagemaker.serializers import CSVSerializer

predictor = model.deploy(
    initial_instance_count=1,
    instance_type='ml.m5.xlarge',
    serializer=CSVSerializer(),
    deserializer=JSONDeserializer()
)

Prolly a solid hour lost.