Title: Fix scoring endpoint HTTP behavior · Issue #110 · microsoft/MLOpsPython · GitHub
Open Graph Title: Fix scoring endpoint HTTP behavior · Issue #110 · microsoft/MLOpsPython
X Title: Fix scoring endpoint HTTP behavior · Issue #110 · microsoft/MLOpsPython
Description: 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....
Open Graph Description: 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:applic...
X Description: 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]]}...
Opengraph URL: https://github.com/microsoft/MLOpsPython/issues/110
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix scoring endpoint HTTP behavior","articleBody":"\r\n1. Scoring endpoint should return json, not stringified json\r\n\r\n```\r\ncurl -H \"Authorization: Bearer $token\" $scoringUri \\\r\n -d '{\"data\":[[1,2,3,4,5,6,7,8,9,10],[10,9,8,7,6,5,4,3,2,1]]}' \\\r\n -H Content-type:application/json\r\n```\r\n\r\nReturns:\r\n\r\n```\r\n\"{\\\"result\\\": [5113.099642122809, 3713.6329271385334]}\"\r\n```\r\n\r\nExpected:\r\n```\r\n{\"result\": [5113.099642122809, 3713.6329271385334]}\r\n```\r\n\r\nProbably we should avoid json.dumps() in:\r\nhttps://github.com/microsoft/MLOpsPython/blob/41ea9b7765183eca83cf3f193e69777858709d35/code/scoring/score.py#L46\r\n\r\n2. Scoring endpoint should not return 200 in case of error\r\n\r\nExceptions are swallowed at\r\nhttps://github.com/microsoft/MLOpsPython/blob/41ea9b7765183eca83cf3f193e69777858709d35/code/scoring/score.py#L47\r\n\r\nThe code should not only return the error message but also set an appropriate HTTP return code.\r\n","author":{"url":"https://github.com/algattik","@type":"Person","name":"algattik"},"datePublished":"2019-11-25T15:28:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/110/MLOpsPython/issues/110"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:18469e1a-d76e-8a09-930f-c27857b4a88d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93BE:336295:1B45A3:246667:697D1962 |
| html-safe-nonce | eaa75248b9f469f8dc14ade36053616a09332b3e31257406aaa9d7d01f5a8d44 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0JFOjMzNjI5NToxQjQ1QTM6MjQ2NjY3OjY5N0QxOTYyIiwidmlzaXRvcl9pZCI6IjM5ODAxODY4MjEwNjg2NTkwNDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 382bd09d22463e67739ddb903d689ad588abc3eed12952dace8351127c109bed |
| hovercard-subject-tag | issue:528160899 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/MLOpsPython/110/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b0d041a227f255daef3d03ffcd5939c804c10fd19455a577d1327d9a95f3973b/microsoft/MLOpsPython/issues/110 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b0d041a227f255daef3d03ffcd5939c804c10fd19455a577d1327d9a95f3973b/microsoft/MLOpsPython/issues/110 |
| og:image:alt | 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:applic... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | algattik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d5649ae937eae7f63d31fc38497f18a9f7584ad9d7f9e934a7b64b964ed52fd |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/MLOpsPython git https://github.com/microsoft/MLOpsPython.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 168217581 |
| octolytics-dimension-repository_nwo | microsoft/MLOpsPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 168217581 |
| octolytics-dimension-repository_network_root_nwo | microsoft/MLOpsPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 87312954ce93e22874ec34d319d96d539f0beba0 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width