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

Fix scoring endpoint HTTP behavior #110

Closed
algattik opened this issue Nov 25, 2019 · 0 comments · Fixed by #121
Closed

Fix scoring endpoint HTTP behavior #110

algattik opened this issue Nov 25, 2019 · 0 comments · Fixed by #121

Comments

@algattik
Copy link
Contributor

  1. Scoring endpoint should return json, not stringified json
curl -H "Authorization: Bearer $token" $scoringUri \
  -d '{"data":[[1,2,3,4,5,6,7,8,9,10],[10,9,8,7,6,5,4,3,2,1]]}' \
  -H Content-type:application/json

Returns:

"{\"result\": [5113.099642122809, 3713.6329271385334]}"

Expected:

{"result": [5113.099642122809, 3713.6329271385334]}

Probably we should avoid json.dumps() in:

return json.dumps({"result": result.tolist()})

  1. Scoring endpoint should not return 200 in case of error

Exceptions are swallowed at

except Exception as e:

The code should not only return the error message but also set an appropriate HTTP return code.

algattik added a commit to algattik/MLOpsPython that referenced this issue Nov 28, 2019
* Use Azure CLI tasks to remove need for variables SP_APP_ID, SP_APP_SECRET, SUBSCRIPTION_ID, TENANT_ID
* Updated gettin_started.md to point out variable path to artifact (microsoft#117)
* Made random hyperparameter (ridge regression alpha) a pipeline parameter, setting its value in the DevOps pipeline (microsoft#107)
* Changed unit test to test actual training code (partially solves microsoft#74)
* Fixed: attach_compute should set exit code after exception (microsoft#113)
* Fixed scoring endpoint HTTP behavior (microsoft#110)
* Fixed PipelineParameters format in call to Azure ML Extension (microsoft#118)
* Fixed Model build environment for Azure Web App for containers (microsoft#119)
@dtzar dtzar closed this as completed in #121 Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant