Silence Hugging Face Hub anonymous-request warning#923
Merged
Conversation
Closes #918. PE-US downloads its calibrated microdata from the Hugging Face Hub on first use. Anonymous requests succeed under the lower rate limit but trigger a server-side X-HF-Warning header that huggingface_hub logs at WARNING level. TAXSIM users rarely have HF accounts and the message reads like an error; raise the huggingface_hub logger to ERROR so transient/informational notices stay hidden while real HTTP failures (which raise exceptions) still surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
huggingface_hublogger toERRORat CLI entry so the server-sideX-HF-Warningrate-limit notice (anonymous downloads still succeed) doesn't surface to TAXSIM usersContext
Closes #918. The warning text "You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads" is emitted by
huggingface_hub.utils._http._warn_on_warning_headerswhen the server returnsX-HF-Warningheaders (which it always does for anonymous requests). PE-US downloads its calibrated microdata from HF on first use; TAXSIM users typically don't have HF accounts, and the warning reads like an error.Test plan
huggingface_hub.utils._httpwarning is suppressed but ERROR-level messages still surfacetests/test_cli_entry_point.py+tests/test_stitched_runner.pypass🤖 Generated with Claude Code