MLServer
MLServer copied to clipboard
Bugfix/Serialize nan and inf as null
Description
This PR aim to fix this issue #1747 by serializing NaN and Inf values to null
Changes Made
Configure pydantic base model in order to serialize nan and inf as null
Related Issues
Checklist
- [x] Code follows the project's style guidelines
- [ ] All tests related to the changes pass successfully
- [x] Documentation is updated (if necessary)
- [ ] Code is reviewed by at least one other team member
- [ ] Any breaking changes are communicated and documented
Additional Notes
@sp1thas Many thanks for your contribution. There are linting issues. Could you take a look please? You can run lint locally using make fmt / make lint
Hmm, basically I just realised this is already tackled since 1.4.0 and #1346 . I'm closing it. In case a similar approach would make sense for np.inf, let me know and I could prepare a PR based on the current implementation