Skip to content

Translate user-facing thinking_metric -> wire thinking_effort_metric#272

Merged
ggprior merged 1 commit into
mainfrom
georg/thinking-effort-metric-align
May 10, 2026
Merged

Translate user-facing thinking_metric -> wire thinking_effort_metric#272
ggprior merged 1 commit into
mainfrom
georg/thinking-effort-metric-align

Conversation

@ggprior
Copy link
Copy Markdown
Contributor

@ggprior ggprior commented May 10, 2026

Summary

The merged renames went different directions on the two repos:

Result: any fit from tabpfn-client@main against api.priorlabs.ai 422s with extra_forbidden on thinking_metric — including plain v3 and v2.5 fits, because the field is serialised as null even when thinking is off.

This PR keeps the public API as thinking_metric (the TabPFNClassifier / TabPFNRegressor kwarg, the instance attribute, and validate_thinking_mode) so existing user code does not change. Only the wire field on FitRequest and the call site that builds the request body are renamed to thinking_effort_metric to match the server's schema.

Diff is +4/-2 across 2 files.

Test plan

  • pytest tests/unit/ — 124/124 passing
  • e2e fit + predict against api.priorlabs.ai for v3 plain, v3 thinking medium, v3 thinking high, v2.5 plain (both classification and regression)

@ggprior ggprior requested a review from a team as a code owner May 10, 2026 10:51
@ggprior ggprior requested review from brendan-priorlabs and removed request for a team May 10, 2026 10:51
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

The merged PRs renamed in different directions:
- tabpfn-server (#852): server's FitRequest field is `thinking_effort_metric`
- tabpfn-client (#270): client's user-facing kwarg is `thinking_metric`

Result: any fit from `tabpfn-client@main` against `api.priorlabs.ai`
422s with `extra_forbidden` on `thinking_metric` — including plain
v3/v2.5 fits, because the client always serialises the field as `null`
even when thinking is off.

Keeps the public API as `thinking_metric` (TabPFNClassifier/Regressor
kwarg, `validate_thinking_mode`, the instance attribute), and only
renames the FitRequest wire field + the call site that builds the
request to `thinking_effort_metric` so the body matches the server's
schema. Existing user code does not need to change.
@ggprior ggprior force-pushed the georg/thinking-effort-metric-align branch from c0f98f0 to 7dd0894 Compare May 10, 2026 10:55
@ggprior ggprior changed the title Rename thinking_metric -> thinking_effort_metric Translate user-facing thinking_metric -> wire thinking_effort_metric May 10, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request renames the thinking_metric parameter to thinking_effort_metric throughout the library, affecting the API models, client implementation, classifier and regressor estimators, and associated unit tests. This update provides a more descriptive name for the optimization metric used during the fit process when thinking effort is specified. I have no feedback to provide.

@ggprior ggprior added this pull request to the merge queue May 10, 2026
Merged via the queue into main with commit bd775f7 May 10, 2026
6 checks passed
@ggprior ggprior deleted the georg/thinking-effort-metric-align branch May 10, 2026 11:00
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.

1 participant