Skip to content

fix: validate quantile support before inference - #135

Merged
geetu040 merged 2 commits into
sktime:mainfrom
SiddhantGahankari:fix/134-validate-quantiles-before-inference
Oct 19, 2026
Merged

geetu040 merged 2 commits into
sktime:mainfrom
SiddhantGahankari:fix/134-validate-quantiles-before-inference

Conversation

@SiddhantGahankari

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #134.

What does this implement/fix? Explain your changes.

Move the quantile capability check in SktimeExecutor.predict() before fit() and predict(). Requests for unsupported quantiles are rejected without computing a point forecast that would be discarded.

  • Move the existing capability:pred_int guard immediately after request conversion, outside the point-forecast error handler.
  • Preserve the existing RuntimeError message and HTTP 400 handling.
  • Keep point-only requests and supported quantile requests on their existing inference paths.
  • Update the method docstring to reflect validation before inference.

The change is limited to src/tserve/runtime/executors/sktime/executor.py.

Does your contribution introduce a new dependency? If yes, which one?

No.

PR checklist for new estimators

N/A.

Any other comments?

Manual verification passed using the current executor directly, without a running HTTP server:

  • Run the reproduction in [BUG] SktimeExecutor runs fit/predict before rejecting unsupported quantile requests #134 and confirm the same rejection message with fit calls: 0 and predict calls: 0.
  • Confirm a point-only request still succeeds (TrendForecaster returned sales forecasts of [18.0, 20.0]).
  • Confirm a quantile-capable model still returns quantile predictions (NaiveForecaster(strategy="drift") returned all requested quantiles: 0.1, 0.5, and 0.9, for both forecast steps).

@read-the-docs-community

read-the-docs-community Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 tserve | 🛠️ Build #35212295 | 📁 Comparing 53ff556 against latest (fa06b9b)

  🔍 Preview build  

No files changed.

@SiddhantGahankari

Copy link
Copy Markdown
Contributor Author

@geetu040 Can you review this? If any changes required, please tell.

@geetu040 geetu040 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, looks good.

@geetu040
geetu040 merged commit 685174b into sktime:main Oct 19, 2026
8 checks passed
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 this pull request may close these issues.

[BUG] SktimeExecutor runs fit/predict before rejecting unsupported quantile requests

2 participants