Skip to content

Route non-interactive library messages through loggers - #14682

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

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

Conversation

@wunianze666-netizen

@wunianze666-netizenwunianze666-netizen commented Sep 1, 2026

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.

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

After maintainer review, I removed the three dedicated regression-test additions in 0c2125ce; the production changes remain limited to the four library files above.

  • ruff check passed for all 4 changed source files.
  • ruff format --check reports all 4 changed source files formatted.
  • python -m compileall -q passed for all 4 changed source files.
  • PYTHONPATH=src PYTHONUTF8=1 python utils/check_ai.py passed.
  • git diff --check upstream/main passed.
  • On the implementation head, the upstream Fast PyTorch Models & Schedulers CPU and Fast PyTorch Pipeline CPU suites both passed. The two failing unrelated jobs timed out in example-training and external Hub tests; none of the failures exercised the changed paths.

AI-assisted contribution

I used Codex to help audit the print sites and implement the changes. 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: dedicated tests were removed as requested in review; the production diff is a direct print-to-module-logger conversion with unchanged control flow.
  • Dead code: none.
  • 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.
  • Addressed maintainer review feedback.
  • 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-actionsgithub-actionsBot 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.

Comment threadtests/models/autoencoders/test_models_vq.py Outdated
Comment threadtests/pipelines/longcat_image/test_prepare_pos_ids.py Outdated
Comment threadtests/pipelines/wan/test_wan_animate.py Outdated
@github-actionsgithub-actionsBot added fixes-issue size/S PR with diff < 50 LOC and removed tests labels Sep 2, 2026
@DN6

DN6 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

@wunianze666-netizen None of the tests files added here are needed. This is a straightforward change. Could you please remove them.

@wunianze666-netizen

Copy link
Copy Markdown
ContributorAuthor

The dedicated test files were removed in 0c2125c. I rechecked the current PR diff today: it now contains only the four production source files, with no test files remaining. The focused source compilation and Ruff checks also pass.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coordinate non-interactive library messages through the project logger

3 participants

@wunianze666-netizen@HuggingFaceDocBuilderDev@DN6