Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #142. Follows up on #137.
What does this implement/fix? Explain your changes.
POST /predict/bytesconstructsCoercedPredictRequestdirectly, bypassing the quantile validation onPredictRequest. An empty list therefore silently produces a point-only forecast, while invalid or duplicate levels fail only after inference has run.Call the existing
_check_quantileshelper from the coerced request validator so invalid levels are rejected before scheduling. Add regression tests for direct construction (including non-finite values), raw multipart requests, and valid values on both routes. The multipart tests modify the wire metadata after encoding so client-side validation cannot hide this gap.The documented error conventions remain unchanged: JSON validation returns 422; multipart decode/validation returns 400. Neither route schedules an invalid request.
None, valid levels, and their input order are preserved.Does your contribution introduce a new dependency? If yes, which one?
No.
Any other comments?
Validated on Linux with Python 3.13:
pytest src/tserve/types/tests/test_models.py src/tserve/server/tests/test_routes.py -q: 79 passed.pytest -q -rs: 210 passed, 2 skipped because optionalpolarsandtransformerswere not installed (the same skips as the unmodified baseline).pre-commit run --all-files --show-diff-on-failure: passed all applicable hooks.Server()and the real sktimenaivemodel checked 16 requests across both routes: all 12 invalid requests stopped before the scheduler; the 4 valid requests retained the same forecasts and quantile presence as the baseline.