aws-samples / amazon-sagemaker-bert-pytorch

MIT No Attribution
64 stars 25 forks source link

Error in JSONSerializers due to new SageMaker SDK #8

Closed CloudaYolla closed 4 years ago

CloudaYolla commented 4 years ago

New SageMaker SDK creates an error.

from sagemaker.predictor import json_deserializer, json_serializer

predictor.serializer = sagemaker.serializers.JSONSerializer()
predictor.deserializer = sagemaker.deserializers.JSONDeserializer()

Resolution:

import sagemaker.serializers

predictor.serializer = sagemaker.serializers.JSONSerializer()
predictor.deserializer = sagemaker.deserializers.JSONDeserializer()
billdoors commented 4 years ago

import sagemaker.serializers is line can be removed, right? since we use sagemaker.serializers.JSONSerializer()

billdoors commented 4 years ago

updated code to reflect v2 change