Skip to content

fix(logging): clamp verbosity levels outside 0-3 - #141

Merged
mkumar73 merged 2 commits into
OpenTabular:mainfrom
xillig:fix/verbosity-out-of-range
Nov 27, 2026
Merged

mkumar73 merged 2 commits into
OpenTabular:mainfrom
xillig:fix/verbosity-out-of-range

Conversation

@xillig

@xillig xillig commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Problem

set_verbosity() mapped any level outside 0-3 to INFO, so verbosity was not monotonic: Preprocessor(verbose=4) printed only the fit summary and dropped the per-feature table and the fitted decisions that verbose=2 / 3 log, and set_verbosity(-1) was louder than 0.

Fix

The level is clamped into 0-3. This also covers configure_logging() and the Preprocessor verbose parameter, which both go through set_verbosity().

Tests and docs

Tests in tests/integration/test_verbosity.py (clamping, configure_logging, verbose=4 logs exactly what verbose=3 logs); docstrings and the fit-time logging section of outputs_and_inspection.md are updated.

Validation

Checks: full suite (2553 passed, 59 skipped, 7 xfailed, coverage >= 94.79%), ruff format / ruff check, pyright (no new diagnostics), docs build with -W, scripts/quickstart.py. Merges cleanly with main and with #136.

xillig and others added 2 commits November 11, 2026 05:42
set_verbosity() mapped any level outside 0-3 to INFO. A level above 3
therefore logged less than 3, and a negative level more than 0:
Preprocessor(verbose=4) printed only the fit summary and dropped the
per-feature table and the fitted decisions that verbose=2 and 3 log.

The level is now clamped into 0-3, so verbosity never decreases as the
level grows. This also applies to configure_logging() and to the
Preprocessor's verbose parameter, which both go through set_verbosity().
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mkumar73
mkumar73 merged commit a2ba11a into OpenTabular:main Nov 27, 2026
19 checks passed
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.

3 participants