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.__init__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.
Dependencies
Depends on: cjm-substrate, cjm-substrate-torch-utils, huggingface-hub, tqdm
Used by: cjm-capability-qwen3-forced-aligner, cjm-capability-voxtral-hf
Metadata
Release files for cjm-substrate-hf-utils 0.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cjm_substrate_hf_utils-0.0.15.tar.gz | 10.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cjm_substrate_hf_utils-0.0.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / cjm_substrate_hf_utils-0.0.15.tar.gz
| Download URL | cjm_substrate_hf_utils-0.0.15.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd4ad33bfe39ab444ce483cf5ed041f4cfa723f6dd4927f1628aba83b39381c0
|
|
BLAKE2b-256 checksum How to use checksums |
730c2604105cb5944290f39a25e6319aa13b81c55082c380f9f95a30d70376e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / cjm_substrate_hf_utils-0.0.15-py3-none-any.whl
| Download URL | cjm_substrate_hf_utils-0.0.15-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98f4f3e0f2060ba692b467f070507d5beeeefe745f351700632da3c95ad9f043
|
|
BLAKE2b-256 checksum How to use checksums |
2ba2e6e2c066577d8bba9cf10c2942bbadb6f6859335d429097818dd28406c16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for cjm-substrate-hf-utils 0.0.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.