Skip to content

fix: stop printing from fit/predict and demote routine log records - #385

Merged
ggprior merged 3 commits into
mainfrom
georg/quiet_library_output
Sep 11, 2026
Merged

fix: stop printing from fit/predict and demote routine log records#385
ggprior merged 3 commits into
mainfrom
georg/quiet_library_output

Conversation

@ggprior

@ggprior ggprior commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

fit() and predict() wrote a \r spinner 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.

  • Spinner removed. fit() and predict() 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.
  • "Train/Test set already exists, skipping upload." is logged at DEBUG. It is the normal dedup path, e.g. predicting on the same X twice.
  • 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 calls traceback.print_exc() before init() raises its own connection error. The traceback is logged at DEBUG.
  • UserDataClient logs through its module logger. It called logging.info() / logging.error(), which run basicConfig() when the root logger has no handlers, so a later basicConfig() in the application did nothing. The error logs that preceded a re-raise are dropped.
  • Missing tabpfn / torch for output_type="full" is now a UserWarning via warnings.warn: the caller can act on it and filter it.
  • Unused ui helpers are removed: setup_logging() (a basicConfig() helper), header(), info(), progress_bar() and print_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 the httpx / httpcore loggers, and the server deprecation notice being a DeprecationWarning, which is hidden by default outside __main__.

Generated with Claude Code

https://claude.ai/code/session_018bhEkFCJWSiwyStDihRFMa

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
@ggprior

ggprior commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@ggprior
ggprior requested a review from a team as a code owner September 11, 2026 13:32
@ggprior
ggprior requested a review from simo-prior September 11, 2026 13:32
ggprior and others added 2 commits September 11, 2026 15:33
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
ggprior requested review from brendan-priorlabs and removed request for simo-prior September 11, 2026 13:39
@ggprior
ggprior added this pull request to the merge queue Sep 11, 2026
Merged via the queue into main with commit a85960a Sep 11, 2026
11 checks passed
@ggprior
ggprior deleted the georg/quiet_library_output branch September 11, 2026 15:08
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