Skip to content

Route non-interactive library messages through loggers - #14682

Open
wunianze666-netizen wants to merge 1 commit into
huggingface:mainfrom
wunianze666-netizen:fix/library-message-logging
Open

Route non-interactive library messages through loggers#14682
wunianze666-netizen wants to merge 1 commit into
huggingface:mainfrom
wunianze666-netizen:fix/library-message-logging

Conversation

@wunianze666-netizen

Copy link
Copy Markdown
Contributor

This consolidates the non-interactive library messages approved in #14479 into one change.

What changed

  • Route VectorQuantizer remap initialization details through its module logger at INFO.
  • Route Wan Animate conditioning-resize messages through its existing module logger at WARNING.
  • Route ignored-argument messages from both LongCat image positional-ID helpers through their existing module loggers at WARNING.
  • Add focused regression tests that assert the logger name, level, and message while also verifying that stdout remains clean.

The message text is preserved where practical. The LongCat Warning: prefix is omitted because the log record now carries the warning severity.

Fixes #14479.

Validation

The focused tests were written first and reproduced the issue as 6 failures: the expected log records were absent and the original text appeared on stdout. After the implementation:

  • 6 passed — focused regression tests across VQ, Wan Animate, and LongCat
  • 19 passed, 31 skippedtests/models/autoencoders/test_models_vq.py
  • 18 passed, 16 skippedtests/pipelines/wan/test_wan_animate.py
  • 4 passedtests/pipelines/longcat_image/test_prepare_pos_ids.py
  • ruff check and ruff format --check passed for all 7 changed files
  • compileall and git diff --check passed

The repository-wide utils/check_copies.py currently reports pre-existing inconsistencies outside this change. Filtering its output for longcat_image produced no matches, so this PR does not introduce a copied-function inconsistency.

AI-assisted contribution

I used Codex to help audit the print sites, implement the changes, and write tests. I read the Coding with AI agents guide, contributor guide, philosophy document, and the relevant model, pipeline, testing, and code-style references.

Final self-review

  • Blocking issues: none.
  • Non-blocking issues: none.
  • Dead code: none. Each changed path is exercised by a focused regression test and remains reachable through the existing library API.
  • Fix before submitting: none.
  • Leave for the actual review: none.
  • Verdict: READY.

Before submitting

  • Used an AI agent and disclosed it.
  • Read the Coding with AI agents guide.
  • Ran the self-review skill and included the final report.
  • Read the contributor guideline and philosophy doc.
  • Discussed and received approval in Coordinate non-interactive library messages through the project logger #14479.
  • Added focused regression tests.
  • Documentation impact reviewed; no user-facing API or documentation update is needed.
  • Model/pipeline authorship (not applicable; this is a logging behavior fix).

cc @DN6

@github-actions github-actions Bot added size/M PR with diff < 200 LOC fixes-issue models tests pipelines and removed size/M PR with diff < 200 LOC fixes-issue labels Sep 1, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coordinate non-interactive library messages through the project logger

2 participants