CADRE
Constraint-Aware Descent Routine Executor — JAX-native constrained optimization.
CADRE provides a unified interface to multiple JAX-compatible optimization backends, with first-class support for box-constrained problems via an active-set method (ADABK family).
This is the minimizer used in Furax-CS package for CMB component separation.
Installation
pip install jax-cadre
With optional scipy solvers (scipy_tnc, scipy_cobyqa):
pip install jax-cadre[scipy]
Quick start
from cadre import minimize
import jax.numpy as jnp
def loss(params, target):
return jnp.sum((params - target) ** 2)
target = jnp.array([1.0, 2.0, 3.0])
lower = jnp.zeros(3)
upper = jnp.ones(3) * 5.0
params, state = minimize(
loss,
init_params=jnp.zeros(3),
solver_name="ADABK0", # or "optax_lbfgs"
lower_bound=lower,
upper_bound=upper,
target=target,
)
print(f"Optimal params: {params}")
Solvers
| Solver | Description |
|---|---|
ADABK0 |
Active-set + AdaBelief, 1 constraint released/step. Best for noisy landscapes. |
ADABK{N} |
Active-set + AdaBelief, up to N×10 % constraints released/step. |
optax_lbfgs |
L-BFGS with zoom linesearch. Best for smooth landscapes. |
adam, adabelief, adaw, sgd |
First-order optax solvers with optional projection. |
optimistix_bfgs/lbfgs/ncg_* |
Optimistix solvers. |
scipy_tnc, scipy_cobyqa |
Scipy solvers via jaxopt (requires cadre[scipy]). |
Full solver documentation and ADABK internals: docs
Advanced usage
from cadre import get_solver
import optimistix as optx
solver, _ = get_solver("ADABK0", rtol=1e-6, atol=1e-6)
state = solver.init(loss, init_params, target, {}, f_struct, None, frozenset())
# ... step manually
License
MIT — see LICENSE.
Metadata
Release files for jax-cadre 0.1.3
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 |
|---|---|---|---|---|
| jax_cadre-0.1.3.tar.gz | 24.7 kB | With provenance | Details for jax_cadre-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jax_cadre-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for jax_cadre-0.1.3-py3-none-any.whl |
Total release size: 48.1 kB
Release files / jax_cadre-0.1.3.tar.gz
| Download URL | jax_cadre-0.1.3.tar.gz |
|---|---|
| Size | 24.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2c47bdca71c000f96a798fcd6350415646d9b963d5626f3fe3954c6bfa63591
|
|
BLAKE2b-256 checksum How to use checksums |
f548996e719969c7bbc9de621deee651b7b9e420dd3c51514d81226923ec0446
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency logRelease files / jax_cadre-0.1.3-py3-none-any.whl
| Download URL | jax_cadre-0.1.3-py3-none-any.whl |
|---|---|
| Size | 23.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1950e499843517cf5ac47cbb73619e0667f23db3bc0420c235b8a90fd6dc792
|
|
BLAKE2b-256 checksum How to use checksums |
9d44db66a2de5f5d4065a824c4db617a5a7c715bd83d0732392b7b31814da62b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency logSecurity for jax-cadre 0.1.3
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for jax_cadre-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency logA 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.