Skip to content
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

Java Wrapper /predict API regression #3210

Closed
amoldavsky opened this issue May 18, 2021 · 1 comment · Fixed by #3211
Closed

Java Wrapper /predict API regression #3210

amoldavsky opened this issue May 18, 2021 · 1 comment · Fixed by #3211
Labels

Comments

@amoldavsky
Copy link
Contributor

Describe the bug

A regression in Seldon-Core 1.7.0 (and possibly many earlier versions) from 0.4.9 on the /predict API.
POST request with a proper JSON payload no longer working.

According to the docs here (and also the code):
https://docs.seldon.io/projects/seldon-core/en/latest/reference/upgrading.html#wrapper-compatibility-table

Only FORM data is supported, because a curl command without an explicit Content-Type header results in
application/x-www-form-urlencoded or multipart/form-data.

The JSON call from the docs does not work:

curl -s -X POST -H 'Content-Type: application/json' \
 -d '{"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \
 ${MODEL_URL}

To reproduce

This call used to work in 0.4.9 (and probably a few versions after)

curl -s -X POST \
	-H 'Content-Type: application/json' \
 	-d '{"jsonData":{ ... }}'
    $MODEL_URL

The above call no longer works and you get:

{"message":"Required String parameter 'json' is not present","error_code":400,"errors":[]}% 

Expected behaviour

Get a valid response like before for the following curl calls:

curl -s -X POST -H 'Content-Type: application/json' \
 -d '{"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \
 ${MODEL_URL}
curl -s -X POST -H 'Content-Type: application/json' \
 -d '{"jsonData": {"foo": "bar"}' \
 ${MODEL_URL}

Environment

Seldon-Core 1.7.0
Java Wrapper Jar 0.4.1
Java Wrapper image 0.2.0

Model Details

N/A

@amoldavsky amoldavsky added bug triage Needs to be triaged and prioritised accordingly labels May 18, 2021
@amoldavsky
Copy link
Contributor Author

discussion in the Slack channel:
https://seldondev.slack.com/archives/C8Y9A8G0Y/p1620740550073300

@ukclivecox ukclivecox removed the triage Needs to be triaged and prioritised accordingly label May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants