Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Brutax

Continuous Integration

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 brutax is heavily inspired from the JAX non-linear optimization library optimistix.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brutax-0.1.0rc1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brutax-0.1.0rc1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file brutax-0.1.0rc1.tar.gz.

File metadata

  • Download URL: brutax-0.1.0rc1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for brutax-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 67696171695b759aa5afa8d65c4b0ca95562158b6865b9c4ffd8f222db293cff
MD5 8e9f7aac014f2c1be0137d525785123e
BLAKE2b-256 473ceb1dba7776ae59fdd807e84081790ce3a70e7342646637e1b3779dd006c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for brutax-0.1.0rc1.tar.gz:

Publisher: publish.yml on michael-0brien/brutax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brutax-0.1.0rc1-py3-none-any.whl.

File metadata

  • Download URL: brutax-0.1.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for brutax-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0e2ecb90dd715f4ff7873306c5155f80ca9ad85bf76bba32a4b94418cb78bda
MD5 20b122f03d54fb8d55e7f0501c50fd98
BLAKE2b-256 5b115ab3a411dfdd395655fa27cb296c2ce4b6840d0427e6ba865aec3f074381

See more details on using hashes here.

Provenance

The following attestation bundles were made for brutax-0.1.0rc1-py3-none-any.whl:

Publisher: publish.yml on michael-0brien/brutax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.0

2 files

This release

0.1.0rc1 This release

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page