Skip to content

Support probability outputs in CatBoost runtime - #2641

Open
tgenman wants to merge 1 commit into
SeldonIO:masterfrom
tgenman:feat/catboost-predict-proba
Open

tgenman wants to merge 1 commit into
SeldonIO:masterfrom
tgenman:feat/catboost-predict-proba

Conversation

@tgenman

@tgenman tgenman commented Nov 3, 2026

Copy link
Copy Markdown

Summary

The CatBoost runtime currently returns class labels only, so clients cannot apply their own probability thresholds. Add predict_proba output selection while keeping predict as the default.

explicit request outputs > model parameters.extra.predict_fn > PREDICT_PROBA > predict

Clients can request predict, predict_proba, or both; PREDICT_PROBA=true sets the process-wide default. Probability outputs preserve class order and have shape [batch, classes], including for a single 1-D input.

Evidence

  • Before: the runtime called CatBoostClassifier.predict() and returned class labels.
  • After: runtimes/catboost/tests passes (10 tests), covering the existing default, environment flag, request output selection, precedence and invalid output.
  • A local HTTP-v2 batch with a CatBoost classifier containing categorical and embedding features returned probabilities matching direct CatBoost inference (4 examples; max absolute difference 0).

Merge Danger

Door: Two-way; the default output remains predict when no option is set.

Blast Radius: CatBoost runtime. Explicit unsupported output names now return an inference error. PREDICT_PROBA is process-wide; the per-model setting or explicit request can override it.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@tgenman

tgenman commented Nov 3, 2026

Copy link
Copy Markdown
Author

Hi @lc525 , could you please take a look at this PR or point me to the right maintainer for the CatBoost runtime? It adds an opt-in probability output while preserving the current default. Thanks!

This branch has not been deployed

No deployments
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.

2 participants