Skip to content

Calling predict with the predictor we got back from deploy #125

@Firas-Ben-Hassan

Description

@Firas-Ben-Hassan

Hello Sagemaker Community,

I get this error when I try to run this command in Sagemaker Notebook : "print(predictor.predict("the password is 15jdgvd "))"

The error :

ValueError Traceback (most recent call last)
in ()
8
9
---> 10 print(predictor.predict("the password is 15jdgvd "))

~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/predictor.py in predict(self, data)
72 """
73 if self.serializer is not None:
---> 74 data = self.serializer(data)
75
76 request_args = {

~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/predictor.py in call(self, data)
247 return _json_serialize_from_buffer(data)
248
--> 249 raise ValueError("Unable to handle input format: {}".format(type(data)))
250
251

ValueError: Unable to handle input format: <class 'str'>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions