Add HuggingFace Hub direct scanning support#219
Merged
thomas-chauchefoin-tob merged 3 commits intomasterfrom Mar 21, 2026
Merged
Add HuggingFace Hub direct scanning support#219thomas-chauchefoin-tob merged 3 commits intomasterfrom
thomas-chauchefoin-tob merged 3 commits intomasterfrom
Conversation
08cd8ae to
d4dc0ad
Compare
d4dc0ad to
de79bbd
Compare
de79bbd to
381f325
Compare
- Add --huggingface REPO_ID argument to scan models directly from HuggingFace Hub - Add --hf-revision and --hf-token arguments for specific revisions and private repos - Add huggingface optional dependency (huggingface_hub >= 0.20.0) - Automatically filter for pickle-based files and skip safe formats like safetensors Usage: fickling --huggingface bert-base-uncased --print-results Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
381f325 to
e2f8eb3
Compare
Replace manual StackedPickle.load/check_safety loop in _scan_huggingface with scan_file (raw pickles) and scan_zip_archive (.pt/.pth PyTorch archives). Warn on skipped files with unrecognized extensions, silently skip known-safe formats (json, safetensors, onnx, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace extension-only routing with find_file_properties to detect PyTorch ZIP archives, raw pickles, and other formats (7z, TAR, NumPy) regardless of file extension. Add fickling[torch] to huggingface extras since polyglot sniffing requires it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 REPO_IDargument to scan models directly from HuggingFace Hub--hf-revisionand--hf-tokenfor revision specification and private reposhuggingfaceoptional dependency:pip install fickling[huggingface]Usage
Test plan
🤖 Generated with Claude Code