fix: stop printing from fit/predict and demote routine log records - #385
Merged
Conversation
A library should leave stdout and logging configuration to the application. The estimators wrote a `\r` spinner to stdout on every fit/predict, which lands in scripts, CI logs and notebook cells and interleaves with log output. Routine events were logged at WARNING, which Python's last-resort handler prints to stderr even when the application configured no logging. UserDataClient logged through module-level logging.info()/error(), which call basicConfig() when the root logger has no handlers, so a later basicConfig() in the application silently did nothing. TABPFN_CLIENT_CI_MODE only disabled the spinner and is removed with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018bhEkFCJWSiwyStDihRFMa
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018bhEkFCJWSiwyStDihRFMa
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018bhEkFCJWSiwyStDihRFMa
ggprior
requested review from
brendan-priorlabs
and removed request for
simo-prior
September 11, 2026 13:39
brendan-priorlabs
approved these changes
Sep 11, 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.
fit()andpredict()wrote a\rspinner to stdout on every call, and routine events were logged at WARNING, which Python prints to stderr even when the application has configured no logging. In scripts and CI logs the spinner frames end up in captured output; in notebooks the spinner and log lines share one output line. A library should leave stdout and logging configuration to the application.fit()andpredict()call the server directly, without the worker thread the spinner needed.TABPFN_CLIENT_CI_MODE, which only disabled the spinner, is removed; setting it is now a no-op.Xtwice.init()no longer prints "Found existing access token, reusing it for authentication." on every run in a terminal.try_reuse_existing_token()already logs the same event at DEBUG.try_connection()no longer logs an ERROR and callstraceback.print_exc()beforeinit()raises its own connection error. The traceback is logged at DEBUG.UserDataClientlogs through its module logger. It calledlogging.info()/logging.error(), which runbasicConfig()when the root logger has no handlers, so a laterbasicConfig()in the application did nothing. The error logs that preceded a re-raise are dropped.tabpfn/torchforoutput_type="full"is now aUserWarningviawarnings.warn: the caller can act on it and filter it.uihelpers are removed:setup_logging()(abasicConfig()helper),header(),info(),progress_bar()andprint_logo_small(). None had callers.Unchanged: the interactive login and signup flows still print, since they are opt-in and need a terminal, and server greeting messages still go through
notify().Not in this PR: the import-time
setLevel(WARNING)on thehttpx/httpcoreloggers, and the server deprecation notice being aDeprecationWarning, which is hidden by default outside__main__.Generated with Claude Code
https://claude.ai/code/session_018bhEkFCJWSiwyStDihRFMa