sif2jax
Functionally pure definitions of optimisation problems extracted from Standard Input Format (SIF), written in JAX.
This is for you if you write optimisation software in JAX (or Python) and want to stress-test it on the CUTEst set of benchmark problems. Features include
- all JAX everything: no Fortran backends
- full support for autodiff, batching, and JIT compilation
- more JAX benefits: run on CPU/GPU/TPU
- clear and human-readable problem definitions, no decoder required
- lean API - no specific problem interface required
Installation
pip install sif2jax
Requires Python 3.11+ and JAX 0.7.2+.
Getting started
We recommend running the benchmarks with pytest-benchmark - use the familiar testing infrastructure to run your benchmarks:
import sif2jax
benchmark_problems = sif2jax.bounded_minimisation_problems
@pytest.mark.benchmark
@pytest.mark.parametrize("problem", sif2jax.unconstrained_minimisation_problems)
def test_lbfgs(benchmark, problem):
...
Alternatively, you can run any arbitrary benchmark problem by passing an index, or directly import a problem by name
import sif2jax
problem = sif2jax.problems[42]
another_problem = sif2jax.cutest.get_problem("ROSENBR")
The problems all have the following methods:
objective- a callable with signaturef(y, args), whereyis the optimisation variabley0- returns the initial guess provided by the SIF file (as a property)args- returns any arguments (frequentlyNone, this is also a property
bounded problems also have a bounds method, and constrained problems additionally include a constraint method.
Metadata
Release files for sif2jax 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sif2jax-0.0.8.tar.gz | 11.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sif2jax-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.1 MB
Release files / sif2jax-0.0.8.tar.gz
| Download URL | sif2jax-0.0.8.tar.gz |
|---|---|
| Size | 11.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c3d6b39293fc98b17a08f71ad21c66d1e9c1d070499828eeacb7ea45528ed7b
|
|
BLAKE2b-256 checksum How to use checksums |
5d5c7ae523396bfd5d97f3dd66c282420f436aa8a10c1f60a15433849e4e4d99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / sif2jax-0.0.8-py3-none-any.whl
| Download URL | sif2jax-0.0.8-py3-none-any.whl |
|---|---|
| Size | 12.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1dca8a587334c566a2bef8ec8df79a806d9998d8ba66e875d782e8e94321fa96
|
|
BLAKE2b-256 checksum How to use checksums |
10a9b10bed6fe33ee1bb61c0faf50fc8f7d843e9ee68bfcca8067cf9e9731061
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|