No project description provided
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jaxert-1.0.0.tar.gz.
File metadata
- Download URL: jaxert-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9362a009578baa8265d8b3ea725bda18df11840518f6a8bc06b808882298eea4
|
|
| MD5 |
27ed737b594b674bd779a2a6db688881
|
|
| BLAKE2b-256 |
f27bfad3766b8567f87436da3f8e59bd8a58f488e56bded5e310f7e2bd0007f5
|
File details
Details for the file jaxert-1.0.0-py3-none-any.whl.
File metadata
- Download URL: jaxert-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3235d037a0e870d2e60df1068761fd40f0fd8f2b9bc937350acfd76a74b61313
|
|
| MD5 |
7df7b7c5948ab33b67b5b3b35bcfdc23
|
|
| BLAKE2b-256 |
4cbc6c8274075c039341cf25cef95c9548979387524043542c29e8741c5b1c7e
|