-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
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.099642122809, 3713.6329271385334]}"
Expected:
{"result": [5113.099642122809, 3713.6329271385334]}
Probably we should avoid json.dumps() in:
MLOpsPython/code/scoring/score.py
Line 46 in 41ea9b7
return json.dumps({"result": result.tolist()}) |
- Scoring endpoint should not return 200 in case of error
Exceptions are swallowed at
MLOpsPython/code/scoring/score.py
Line 47 in 41ea9b7
except Exception as e: |
The code should not only return the error message but also set an appropriate HTTP return code.
Metadata
Metadata
Assignees
Labels
No labels