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.20

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.20
File Size Uploaded Provenance Actions
hugpy_resources-0.1.20.tar.gz 287.5 kB Without provenance Details for hugpy_resources-0.1.20.tar.gz

Built distribution (wheel)

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

Total release size: 636.9 kB

Release files / hugpy_resources-0.1.20.tar.gz

Download URL hugpy_resources-0.1.20.tar.gz
Size 287.5 kB
Tags Source
SHA-256 checksum
How to use checksums
60480d0addaafc5ca839469d6e3663c6c50fcc86c41d97942c6964a1ad54fcc4
BLAKE2b-256 checksum
How to use checksums
fd55f8465bdb4545ee5896c5664b1c59b8fffca4b2ba9267b2d5f3a0cceb3040
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.20-py3-none-any.whl

Download URL hugpy_resources-0.1.20-py3-none-any.whl
Size 349.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44ae66bf364f54de5b606909a965791fc77503661b82e38dfc05bc04dce899bd
BLAKE2b-256 checksum
How to use checksums
1a46380fb2307a3e810a75240460d6a60dca6b345d5663ca2438d5dcda003c01
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.20

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