JAXert: Assertion with JAX
JAXert provides simple assertions working with JAX.
These assertions are designed for testing.
Usage
jax_assert(cond)assert_allclose(actual, desired)
Other options are described their docstrings.
Internals
To raise errors even in jitted functions,
we utilize jax.debug.callback.
JAX has another mechanism checkify, where errors are converted to an additional return value containing error informations. The biggest disadvantage is that we have to handle such errors at outside jitted functions, which means we must change its call signature.
Known Limitations
- Depending on usages,
AssertionErrororjaxlib.xla_extension.XlaRuntimeErrorare raised. We cannot control error class consistently. - Even though catching errors, JAX automatically dumps stack traces, which might be annoying.
Metadata
Release files for jaxert 1.0.0
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 |
|---|---|---|---|---|
| jaxert-1.0.0.tar.gz | 3.1 kB | Without provenance | Details for jaxert-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jaxert-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for jaxert-1.0.0-py3-none-any.whl |
Total release size: 6.8 kB
Release files / jaxert-1.0.0.tar.gz
| Download URL | jaxert-1.0.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9362a009578baa8265d8b3ea725bda18df11840518f6a8bc06b808882298eea4
|
|
BLAKE2b-256 checksum How to use checksums |
f27bfad3766b8567f87436da3f8e59bd8a58f488e56bded5e310f7e2bd0007f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / jaxert-1.0.0-py3-none-any.whl
| Download URL | jaxert-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3235d037a0e870d2e60df1068761fd40f0fd8f2b9bc937350acfd76a74b61313
|
|
BLAKE2b-256 checksum How to use checksums |
4cbc6c8274075c039341cf25cef95c9548979387524043542c29e8741c5b1c7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for jaxert 1.0.0
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.