Expand description
HuggingFace Hub Client
Production-hardened client addressing review findings:
- Rate limit handling (429 with exponential backoff)
- SafeTensors enforcement (–safe-only default)
- Model card auto-generation
- Differential uploads (content-addressable)
Structs§
- File
Hash - File hash for content-addressable storage
- Model
Card Metadata - Model card metadata
- Rate
Limit Config - Rate limit configuration
- Rate
Limit State - Rate limit state for tracking backoff
- Secret
Detection - Secret detection result
- Upload
Manifest - Manifest of files for differential upload
Enums§
- File
Safety - File safety classification
- Safety
Policy - Safety policy for model downloads
- Secret
Type - Detected secret type
Functions§
- check_
download_ allowed - Check if download should be allowed based on policy
- check_
push_ allowed - Check if push should be blocked due to secrets
- classify_
file_ safety - Classify file safety based on extension
- generate_
model_ card - Generate model card content
- scan_
for_ secrets