Skip to main content

hugpy-resources

Hugpy Resources is the shared function library used by Discovery, Wrapper, Core and other Hugpy packages. It supplies the vocabulary and calculations that let a model record, a memory estimate and a placement decision use the same units and definitions.

Installation

Install the base distribution for the shared functions. The inspection extra adds tokenizer inspection dependencies. The yaml extra adds YAML support.

python -m pip install hugpy-resources

Quick start

Calculate the stored payload of a dense tensor from its shape and element width.

from hugpy_resources.imports import tensor_bytes

payload = tensor_bytes((32, 128), 2)
print(payload)  # 8192 bytes

Working with resource evidence

Task What the library supplies
Inspect a model directory Readers for GGUF and safetensors headers, model configuration, tensor shapes and stored types
Estimate a placement Tensor and KV-cache sizing, device budgets, layer allocation and resource bounds
Read or publish state Filesystem, hashing, SQLite, settings and HTTP functions shared by the services
Inspect a fleet compute_snapshot joins Core’s worker feed with its serving catalog. compute_action sends a worker or model operation through the caller’s authenticated connection.
Interpret a record Typed terms, units, domain settings and human-readable definitions

A tensor payload accounts for stored elements. A runtime peak also depends on context, representation, allocator overhead and backend workspaces. Keep missing bounds explicit when deciding whether a model fits.

Integration

Import individual names from hugpy_resources.imports. In a Hugpy service, expose the names once in the service’s imports/module_imports.py. Consumers can then use the same implementation through their package’s import boundary. Source contributors can find the term definitions under src/hugpy_resources/imports/TERMS/.

Shared imports

Service packages expose the functions they use through their own imports module. This keeps model inspection, hashing and placement calculations consistent across producers and consumers. For example, Discovery records evidence from model files, Wrapper uses those facts when selecting a placement, and Core reads the worker’s published results. Callers that need to distinguish a missing measurement from a measured zero should preserve that distinction throughout.

Metadata

Release files for hugpy-resources 0.1.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hugpy-resources 0.1.19
File Size Uploaded Provenance Actions
hugpy_resources-0.1.19.tar.gz 275.8 kB Without provenance Details for hugpy_resources-0.1.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hugpy-resources 0.1.19
File Interpreter ABI Platform Actions
hugpy_resources-0.1.19-py3-none-any.whl Python 3 none any Details for hugpy_resources-0.1.19-py3-none-any.whl

Total release size: 614.0 kB

Release files / hugpy_resources-0.1.19.tar.gz

Download URL hugpy_resources-0.1.19.tar.gz
Size 275.8 kB
Tags Source
SHA-256 checksum
How to use checksums
150a1bb692b0b425335121b8df2e86a2844a5bf8f01c7a92db989dae22eecd26
BLAKE2b-256 checksum
How to use checksums
6773274d5607e893cfb3a5f201cf28e97b6e60e1bc24ad6a28130060b9ddabe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / hugpy_resources-0.1.19-py3-none-any.whl

Download URL hugpy_resources-0.1.19-py3-none-any.whl
Size 338.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdffcaa86c1d545cf30043a9767e18325888840483a27b0509575db32fd34844
BLAKE2b-256 checksum
How to use checksums
da5bb42d15b5b89540837f8d270eb6015f2e559fe1aee297796506c4fc02fbe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for hugpy-resources 0.1.19

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page