cjm-substrate-hf-utils
Hugging Face Hub helpers for cjm-substrate capabilities: cache-config mixin, progress-reporting snapshot downloads, and typed-OOM model loading.
Modules
cjm_substrate_hf_utils.cache_config— A dataclass mixin adding HuggingFace Hub cache / revision / air-gap / security fields to a capability's config, with RELOAD_TRIGGER + JSON-schema metadata pre-set.cjm_substrate_hf_utils.download— Wrap huggingface_hub.snapshot_download so per-file progress flows to the capability's report_progress, defeating the substrate's stall detector during downloads.cjm_substrate_hf_utils.loading— Call model_class.from_pretrained(...) and convert CUDA OOM into the substrate's typed CapabilityResourceError for CR-7 reactive retry.
API
cjm_substrate_hf_utils.cache_config
HFCacheConfigclass — Mixin adding HuggingFace Hub cache/revision/air-gap/security fields to a capability config.
cjm_substrate_hf_utils.download
snapshot_download_with_progressfunction — Download an HF Hub snapshot, streaming per-file progress toreport_progress.
cjm_substrate_hf_utils.loading
load_pretrained_with_oomfunction — Callmodel_class.from_pretrained(repo_id, **kwargs), converting CUDA OOM to a typed error.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cjm_substrate_hf_utils-0.0.14.tar.gz.
File metadata
- Download URL: cjm_substrate_hf_utils-0.0.14.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
791af799c8710547ee92e5b95d4dc6f11931d50a2413f3da1ced355720603a4c
|
|
| MD5 |
0ace36bb8ce9bd91ff2756c4c84a0526
|
|
| BLAKE2b-256 |
061a2e5fb6dbc97d1c042f50998d2d5516f64c185f245c49f670548ef4d510f7
|
File details
Details for the file cjm_substrate_hf_utils-0.0.14-py3-none-any.whl.
File metadata
- Download URL: cjm_substrate_hf_utils-0.0.14-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab63b51ebe477450015f124a8df1e354af43ab15ec68daf5ac733e825e9a1cec
|
|
| MD5 |
d8d5a0d156a2ff16bc44ee0a0afb836d
|
|
| BLAKE2b-256 |
4d6ab988151d95707fb93724e107daabf31b9ce1b00e6e1e1faf9d680bb1e8b4
|