tencheck
tencheck provides a simple set of utilities for analyzing and validating the properties of layers of deep neural nets.
It's typically quite difficult to validate that a layer "behaves properly" (oftentimes, the final barometer is simply how well a model performs with the layer included), and many brittle unit tests have been written involving randomly instantiated tensors and is_close checks. We believe a good "first line of defense" for neural nets is to create a suite of properties that can be asserted about a layer, while requiring minimal effort per layer in order to do so.
We think there are two aspects of property-based testing that are quite useful to take inspiration from:
- Automatically generating inputs (and generating inputs of variable sizes and values to elucidate properties of interest).
- Evaluating properties based on the maintenance of invariants instead of attempting to exactly match values (which is particularly difficult to interpret in deep neural nets).
However, an important difference is that the properties of interest are generally fairly generic and often shared between layers, while the input generation strategies are pretty similar (they're all tensors). So the focus of tencheck is to provide:
- An (attempted) universal input generation harness.
- A variety of interesting properties.
- Three modalities: assertion, analysis, and profiling.
The following requirements need to be met for tencheck to work:
- Your layers are implemented in torch.
- The
.forward()method is annotated with jaxtyping.
Backlog
- For profiling, use a grid of input sizes to generate performance curves.
- Pick a flop counter and use for profiling
- Tensor container types include more options like dataclasses.
- Auto-generate simple hyperparameters for layer instantiation.
- Refine dtype mapping and coherence.
Metadata
Release files for tencheck 0.0.4
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 | Actions |
|---|---|---|---|---|
| tencheck-0.0.4.tar.gz | 11.5 kB | Without provenance | Details for tencheck-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tencheck-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for tencheck-0.0.4-py3-none-any.whl |
Total release size: 23.2 kB
Release files / tencheck-0.0.4.tar.gz
| Download URL | tencheck-0.0.4.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c42d61da716917a70f57db4074eb9ca3082c56458e5a79f4b180273849a31d9
|
|
BLAKE2b-256 checksum How to use checksums |
45109a27bd617c76c89863ab940229f3d7671c5b2356e26989ab4067cb7facf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.4
|
Release files / tencheck-0.0.4-py3-none-any.whl
| Download URL | tencheck-0.0.4-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fdb121ae2af14848d6dd6a18349c95b51101680f055beaf5b292615c7a13158
|
|
BLAKE2b-256 checksum How to use checksums |
b9084fd9861deaff70ce1bf22271769bd417aa894aee3af5cb4b0a6db7c89157
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.4
|
Security for tencheck 0.0.4
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.