Adaptive per-call test set row limit at predict time - #348
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 208dc36. Configure here.
klemens-floege
force-pushed
the
increase-row-limits
branch
from
July 24, 2026 13:15
208dc36 to
58f2367
Compare
The API accepts much larger test sets, but prediction compute scales with n_train_rows * n_test_rows, so the effective per-call test row limit shrinks as the fitted training set grows (e.g. 1M training rows -> 250k test rows). Enforce this at predict time so oversized test sets fail fast client-side with a clear message instead of erroring after upload. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
klemens-floege
force-pushed
the
increase-row-limits
branch
from
July 24, 2026 14:03
58f2367 to
4ccee6a
Compare
klemens-floege
requested review from
brendan-priorlabs
and removed request for
brendan-priorlabs
July 24, 2026 14:20
simo-prior
reviewed
Jul 27, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bj6nS4iEEnEPSTRigpA4PS
simo-prior
approved these changes
Jul 27, 2026
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.

What
The API now accepts much larger test sets, and the static row/cell limits the client enforces already come from
get_model_limits. What was missing client-side is the adaptive part: prediction compute scales withn_train_rows * n_test_rows, so the effective per-call test row limit shrinks as the fitted training set grows.PREDICT_ROW_PAIRS_BUDGET(250k × 1M): at predict time the test row limit ismin(test_set_max_rows, budget // n_train_rows)— e.g. 1M training rows → 250k test rows per call, ≤ 250k training rows → the static 1M cap binds.validate_test_settakes an optionaltrain_rows; bothTabPFNClassifierandTabPFNRegressorpass the fitted training set size, so oversized test sets fail fast client-side with a clear "split across multiple calls" message instead of erroring after upload.Tests
Unit tests cover the static cap, the adaptive limit at the 1M-train anchor, the adaptive limit never exceeding the static cap, and the offline no-op when limits are unavailable.
🤖 Generated with Claude Code