-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to solve the problem of ValueError: Expected 2D array, got 1D array instead #15
Comments
The data is expected to be any number of prediction rows. This should be solveable by wrapping in an array, or appending '\n' at end if string. Can you provide the input_fn and the inference call you are making? |
Hello, I have the same issue. Could any one please tell me how to solve it? My full code is
I do not create input_fn function. I think it used the default one |
Hi, |
I refer to the same process to deploy the sagemaker endpoint for my own application. I can predict the results in Jupyter Notebook by using 1d array. Then, I would like invoke it in postman. It complains "ValueError: Expected 2D array, got 1D array instead".
The Content-Type is set as 'text/csv'. The body just contains the data stream.
I never met such trouble for the sagemaker built-in algorithm.
Any comments are welcome!
The text was updated successfully, but these errors were encountered: