Skip to content

Commit 93bf855

Browse files
author
Balaji Veeramani
committed
Update deserializers.py
1 parent 3bdd1bf commit 93bf855

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sagemaker/deserializers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def deserialize(self, stream, content_type):
5252
@property
5353
@abc.abstractmethod
5454
def ACCEPT(self):
55-
"""The content type that is expected from the inference endpoint."""
55+
"""The content types that are expected from the inference endpoint."""
5656

5757

5858
class StringDeserializer(BaseDeserializer):
@@ -161,7 +161,7 @@ def deserialize(self, stream, content_type):
161161
class NumpyDeserializer(BaseDeserializer):
162162
"""Deserialize a stream of data in the .npy format."""
163163

164-
ACCEPT = ["application/x-npy"]
164+
ACCEPT = ["application/x-npy", "text/csv", "application/json"]
165165

166166
def __init__(self, dtype=None, allow_pickle=True):
167167
"""Initialize the dtype and allow_pickle arguments.
@@ -250,7 +250,7 @@ def deserialize(self, stream, content_type):
250250
class JSONLinesDeserializer(BaseDeserializer):
251251
"""Deserialize JSON lines data from an inference endpoint."""
252252

253-
ACCEPT = "application/jsonlines"
253+
ACCEPT = ["application/jsonlines"]
254254

255255
def deserialize(self, stream, content_type):
256256
"""Deserialize JSON lines data from an inference endpoint.

0 commit comments

Comments
 (0)