Brutax
When all else fails, why not a brute-force search! Brutax is a JAX library for function optimization by brute-force grid search. Features include:
- Highly-parallel function evaluations
- PyTree-valued grids
- Customizable search behavior downstream
- Smooth integration with JAX function transformations: JIT, autodiff, vectorization, and scaling across GPU/TPUs
Installation
pip install brutax
Quick example
import brutax
import jax.numpy as jnp
def fn(tree_grid_point, _):
x, y = tree_grid_point
return (x - 1.)**2 + (y - 2.)**2
# The `tree_grid` is the cartesian product of x and y grids
x_grid, y_grid = (jnp.arange(-5., 5., 1), jnp.arange(-5., 5., 0.1))
tree_grid = (x_grid, y_grid)
# Run grid search over (10 x 100) grid
sol = brutax.run_grid_search(
fn, method=brutax.MinimumSearchMethod(), tree_grid=tree_grid, args=None
)
x_min, y_min = sol.value
assert jnp.isclose(x_min, 1.) and jnp.isclose(y_min, 2.)
Acknowledgements
- The design of
brutaxis heavily inspired from the JAX non-linear optimization libraryoptimistix.
Metadata
Release files for brutax 0.1.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 | |
|---|---|---|---|
| brutax-0.1.0.tar.gz | 18.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brutax-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.4 kB
Release files / brutax-0.1.0.tar.gz
| Download URL | brutax-0.1.0.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f4889c0543dd82123a3345995891d5fdf8fe34e06efa03a5b1b9799066282f4
|
|
BLAKE2b-256 checksum How to use checksums |
aaea1ab4fd741ededd300db9f038d33b1bf3063da08afd774831425c32f2cb46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 26, 2026.
Transparency logRelease files / brutax-0.1.0-py3-none-any.whl
| Download URL | brutax-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ab183dadd803814d3e9f3c43074447fd4282acb624c7071985be5dd3c3cca18
|
|
BLAKE2b-256 checksum How to use checksums |
ba353f739af708abe8923a394c9141874995e86a300becf06f38a8a9c9b726a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 26, 2026.
Transparency log