dfbench 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dfbench-0.2.0 → dfbench-0.2.2}/.gitignore +5 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/PKG-INFO +45 -34
- {dfbench-0.2.0 → dfbench-0.2.2}/README.md +42 -33
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Algorithm-Status.md +7 -7
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Algorithms.md +120 -119
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Architecture-Overview.md +16 -16
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Benchmarking.md +13 -13
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/FAQ.md +6 -6
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Home.md +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Implementing-a-New-Algorithm.md +24 -24
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Installation.md +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Metrics-Reference.md +26 -26
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Objective-API-Reference.md +54 -50
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Problems.md +35 -35
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Storage-and-Checkpointing.md +55 -16
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Testing.md +14 -13
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/Utilities-and-Helpers.md +6 -6
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/algorithm-status/main.typ +8 -8
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/algorithm-status/template.typ +12 -12
- {dfbench-0.2.0 → dfbench-0.2.2}/pyproject.toml +3 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/__init__.py +2 -2
- dfbench-0.2.2/src/dfbench/algorithms/__init__.py +262 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/_dfo_common.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/_scipy_common.py +10 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/nelder_mead.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/omads_mads.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/pdfo/lincoa.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/pdfo/newuoa.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/pdfo/uobyqa.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/powell.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/pybobyqa.py +5 -5
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/__init__.py +0 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/cmaes_sep_cma.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/evosax_es.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/evox_es.py +23 -17
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/evox_pso.py +10 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/jax_es.py +12 -12
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/nevergrad/_common.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/nevergrad/ngopt.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/nevergrad/oneplusone.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/nevergrad/tbpsa.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/pycma_cmaes.py +5 -5
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/generative/vae_sampling.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/global_search/__init__.py +2 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/global_search/basin_hopping.py +8 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/global_search/dual_annealing.py +7 -1
- {dfbench-0.2.0/src/dfbench/algorithms/evolutionary → dfbench-0.2.2/src/dfbench/algorithms/global_search}/random_search.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/__init__.py +1 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/adam_gd.py +6 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/custom_jax.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/lbfgs_gd.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/na_adam_gd.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/_common.py +8 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adabelief.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adadelta.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adafactor.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adagrad.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adam.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adamax.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adamaxw.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adamw.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/adan.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/amsgrad.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/lamb.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/lion.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/lookahead.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/nadam.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/nadamw.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/noisy_sgd.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/novograd.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/oadam.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/ogd.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/polyak_sgd.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/radam.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/rmsprop.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/rprop.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/sam.py +2 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/schedule_free_adam.py +1 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/sgd.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/sign.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/sm3.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/sophia.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/yogi.py +1 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax_lbfgs.py +9 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/sa_gd.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/_common.py +12 -6
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/sr1.py +6 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/__init__.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/ax_baxus.py +9 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/ax_saasbo.py +9 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/__init__.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/_botorch_common.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/botorch_bo.py +15 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/botorch_gebo.py +10 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/botorch_linebo.py +10 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/botorch_qkg.py +9 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/botorch_qnei.py +10 -5
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/botorch_rembo.py +11 -5
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/botorch/botorch_turbo.py +15 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/hebo_bo.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/restir.py +10 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/smac_bo.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/surrogate_based/turbo_lbfgs.py +19 -8
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/utils/gp.py +6 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/utils/initial_design.py +6 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/utils/misc.py +7 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/algorithm.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/display.py +5 -5
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/objective.py +85 -56
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/problem.py +5 -5
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/storage/__init__.py +8 -8
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/storage/backends.py +27 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/storage/exporter.py +58 -16
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/storage/manager.py +22 -16
- dfbench-0.2.2/src/dfbench/core/storage/resolver.py +115 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/storage/saveconfig.py +17 -13
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/storage/serializers.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/storage/state.py +34 -22
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/base_problem.py +10 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/uifo/uifo_problem.py +40 -23
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/voyager/constrained_voyager_problem.py +26 -6
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/voyager/voyager_problem.py +39 -22
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/voyager/voyager_tuning_problem.py +39 -22
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/slow/test_algorithms_integration.py +1 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/slow/test_benchmark_full.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/slow/test_problems_full.py +6 -6
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_algorithm_protocol.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_algorithms_uniform.py +7 -7
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_algorithms_unit.py +11 -9
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_api_imports.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_benchmark_smoke.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_cma_family.py +5 -5
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_config.py +10 -10
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_dfo_algorithms.py +1 -1
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_display.py +12 -12
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_init_env.py +2 -2
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_metrics.py +16 -16
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_objective_invariants.py +22 -22
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_objective_penalty_fn.py +3 -3
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_objective_randomness.py +9 -9
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_problem_bounds_overrides.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_problem_protocol.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_problem_spec.py +4 -4
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_storage.py +131 -23
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_utils.py +5 -5
- dfbench-0.2.0/src/dfbench/algorithms/__init__.py +0 -221
- dfbench-0.2.0/src/dfbench/core/storage/resolver.py +0 -101
- {dfbench-0.2.0 → dfbench-0.2.2}/LICENSE +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/docs/_Sidebar.md +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/derivative_free/pdfo/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/evolutionary/nevergrad/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/optax/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/bfgs.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/cobyla.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/cobyqa.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/dogleg.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/lbfgsb.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/newton_cg.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/nonlinear_cg.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/slsqp.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/tnc.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/trust_constr.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/trust_krylov.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/gradient_based/scipy/trust_ncg.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/utils/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/algorithms/utils/weighted_acq.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/benchmark/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/benchmark/benchmark.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/benchmark/metrics.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/_init_env.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/config.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/core/utils.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/uifo/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/src/dfbench/problems/voyager/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/conftest.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/slow/__init__.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_bo_batch.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_custom_jax_batch.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_objective_space_mode.py +0 -0
- {dfbench-0.2.0 → dfbench-0.2.2}/tests/test_scipy_wrapper.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dfbench
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Differometor Benchmark - Optimization algorithms and problem definitions
|
|
5
5
|
Project-URL: Homepage, https://github.com/artificial-scientist-lab/Differometor-Benchmark
|
|
6
6
|
Project-URL: Repository, https://github.com/artificial-scientist-lab/Differometor-Benchmark
|
|
@@ -34,6 +34,7 @@ Requires-Dist: cmaes>=0.10.0; extra == 'all'
|
|
|
34
34
|
Requires-Dist: evosax>=0.1.6; extra == 'all'
|
|
35
35
|
Requires-Dist: evox>=1.3.0; extra == 'all'
|
|
36
36
|
Requires-Dist: gpytorch>=1.14; extra == 'all'
|
|
37
|
+
Requires-Dist: hebo>=0.3.2; extra == 'all'
|
|
37
38
|
Requires-Dist: nevergrad>=1.0.12; extra == 'all'
|
|
38
39
|
Requires-Dist: omads>=2408.0; extra == 'all'
|
|
39
40
|
Requires-Dist: optax>=0.2.6; extra == 'all'
|
|
@@ -54,6 +55,7 @@ Provides-Extra: bo
|
|
|
54
55
|
Requires-Dist: ax-platform>=1.2.4; extra == 'bo'
|
|
55
56
|
Requires-Dist: botorch>=0.16.1; extra == 'bo'
|
|
56
57
|
Requires-Dist: gpytorch>=1.14; extra == 'bo'
|
|
58
|
+
Requires-Dist: hebo>=0.3.2; extra == 'bo'
|
|
57
59
|
Requires-Dist: torch>=2.9.1; extra == 'bo'
|
|
58
60
|
Provides-Extra: cuda12
|
|
59
61
|
Requires-Dist: jax[cuda12]==0.9.0.1; extra == 'cuda12'
|
|
@@ -88,11 +90,20 @@ Provides-Extra: torch
|
|
|
88
90
|
Requires-Dist: torch>=2.9.1; extra == 'torch'
|
|
89
91
|
Description-Content-Type: text/markdown
|
|
90
92
|
|
|
93
|
+
> [!IMPORTANT]
|
|
94
|
+
> **BETA RELEASE:** This repository is currently in beta. The official competition will start on **July ~7**.
|
|
95
|
+
|
|
91
96
|
# Differometor Benchmark
|
|
92
97
|
|
|
98
|
+
[](https://pypi.python.org/pypi/dfbench)
|
|
99
|
+
[](https://pypi.python.org/pypi/dfbench)
|
|
100
|
+
[](https://pypi.python.org/pypi/dfbench)
|
|
101
|
+
[](https://github.com/astral-sh/ruff)
|
|
102
|
+
[](https://github.com/artificial-scientist-lab/Differometor-Benchmark/actions/workflows/tests.yaml)
|
|
103
|
+
|
|
93
104
|
A benchmarking framework for optimization algorithms on gravitational-wave detector design problems, built on top of the [Differometor](https://github.com/artificial-scientist-lab/Differometor) simulator.
|
|
94
105
|
|
|
95
|
-
> **For detailed documentation, see the [Wiki](
|
|
106
|
+
> **For detailed documentation, see the [Wiki](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki).**
|
|
96
107
|
|
|
97
108
|
## TL;DR (I want to try my own algorithm)
|
|
98
109
|
|
|
@@ -132,7 +143,7 @@ obj.plot_loss()
|
|
|
132
143
|
obj.save_run_to_file("my_run.npz")
|
|
133
144
|
```
|
|
134
145
|
|
|
135
|
-
**A loss below 0 means your solution beats the real Voyager detector's sensitivity.** (On `VoyagerProblem` without physical constraints
|
|
146
|
+
**A loss below 0 means your solution beats the real Voyager detector's sensitivity.** (On `VoyagerProblem` without physical constraints, you might be burning mirrors.)
|
|
136
147
|
|
|
137
148
|
### Evaluation Methods
|
|
138
149
|
|
|
@@ -154,8 +165,8 @@ The problems are JAX-based and differentiable up to second order. Use whichever
|
|
|
154
165
|
```python
|
|
155
166
|
from dfbench import t2j, j2t
|
|
156
167
|
|
|
157
|
-
params_jax = t2j(params_torch) # Torch
|
|
158
|
-
losses_torch = j2t(obj.vmap_value(params_jax)) # JAX
|
|
168
|
+
params_jax = t2j(params_torch) # Torch -> JAX
|
|
169
|
+
losses_torch = j2t(obj.vmap_value(params_jax)) # JAX -> Torch
|
|
159
170
|
```
|
|
160
171
|
|
|
161
172
|
This adds negligible overhead compared to the objective function itself.
|
|
@@ -171,11 +182,11 @@ This adds negligible overhead compared to the objective function itself.
|
|
|
171
182
|
|
|
172
183
|
Both constrained problems accept a `power_penalty_fn(value, threshold)` callable to control how power-constraint violations are penalized. Built-in presets: `squashed_relu_penalty` (default), `relu_penalty`, `zero_penalty`. Feel free to try own ones. The penalty function can also be swapped after construction via `obj.set_penalty_fn(fn)` (before `obj.start_logging()`), which re-traces the objective so the change takes effect. The unconstrained Voyager problems reject this call because they have no power-constraint path.
|
|
173
184
|
|
|
174
|
-
Constrained problems also expose aux diagnostics. `obj.value_aux(params)` and `obj.vmap_value_aux(batch)` return `(loss, aux)` where `aux` carries the loss decomposition, a physical `is_feasible` flag, per-constraint violations, and the raw per-group power arrays. Enable `save` tokens like `is_feasible`, `power_values`, or the `aux` alias and the standard `obj.value` / `obj.value_and_grad` loop records the enabled aux fields in the same forward pass, with no code change. See [Problems](
|
|
185
|
+
Constrained problems also expose aux diagnostics. `obj.value_aux(params)` and `obj.vmap_value_aux(batch)` return `(loss, aux)` where `aux` carries the loss decomposition, a physical `is_feasible` flag, per-constraint violations, and the raw per-group power arrays. Enable `save` tokens like `is_feasible`, `power_values`, or the `aux` alias and the standard `obj.value` / `obj.value_and_grad` loop records the enabled aux fields in the same forward pass, with no code change. See [Problems](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Problems) for the aux schema and [Objective API Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Objective-API-Reference) for the full method set.
|
|
175
186
|
|
|
176
187
|
All problems also support `bounds_overrides` (e.g. `{"tuning": (0, 45)}`) to narrow default property bounds and `signal_floor` to floor detector signal magnitudes before sensitivity normalization. `signal_floor` defaults to `1e-20`. Use `problem.print_bounds()` to inspect effective bounds.
|
|
177
188
|
|
|
178
|
-
See [Problems](
|
|
189
|
+
See [Problems](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Problems) for details on loss computation, parameter meanings, and constraints.
|
|
179
190
|
|
|
180
191
|
---
|
|
181
192
|
|
|
@@ -212,7 +223,7 @@ pip install -e . # CPU-only editable install
|
|
|
212
223
|
pip install -e ".[all,cuda13,analysis]" # All backends, CUDA 13, and analysis extras
|
|
213
224
|
```
|
|
214
225
|
|
|
215
|
-
See [Installation](
|
|
226
|
+
See [Installation](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Installation) for GPU setup details and HPC notes.
|
|
216
227
|
|
|
217
228
|
---
|
|
218
229
|
|
|
@@ -223,8 +234,8 @@ OptimizationAlgorithm.optimize()
|
|
|
223
234
|
│
|
|
224
235
|
▼
|
|
225
236
|
┌───────────┐ records losses, params, grads, timestamps
|
|
226
|
-
│ Objective │
|
|
227
|
-
└─────┬─────┘ bounded
|
|
237
|
+
│ Objective │ ──> enforces time / eval budgets
|
|
238
|
+
└─────┬─────┘ bounded <-> unbounded sigmoid transform
|
|
228
239
|
│
|
|
229
240
|
▼
|
|
230
241
|
ContinuousProblem (VoyagerProblem, VoyagerTuningProblem, ConstrainedVoyagerProblem, UIFOProblem)
|
|
@@ -235,7 +246,7 @@ OptimizationAlgorithm.optimize()
|
|
|
235
246
|
|
|
236
247
|
**Design Idea:** Algorithms never create their own `Objective`, they receive a pre-configured one. This lets the benchmark harness or user script control budgets, seeds, and history settings uniformly. The algorithm only has to implement its optimization logic.
|
|
237
248
|
|
|
238
|
-
See [Architecture Overview](
|
|
249
|
+
See [Architecture Overview](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Architecture-Overview) for full design details.
|
|
239
250
|
|
|
240
251
|
---
|
|
241
252
|
|
|
@@ -247,15 +258,15 @@ src/dfbench/
|
|
|
247
258
|
│ ├── problem.py # ContinuousProblem ABC + ProblemSpec
|
|
248
259
|
│ ├── algorithm.py # OptimizationAlgorithm ABC + AlgorithmType enum
|
|
249
260
|
│ ├── objective.py # Objective wrapper (central piece)
|
|
250
|
-
│ └── utils.py # torch
|
|
261
|
+
│ └── utils.py # torch<->jax conversion, inverse sigmoid
|
|
251
262
|
├── algorithms/
|
|
252
263
|
│ ├── derivative_free/ # OMADS, PDFO/Py-BOBYQA, NelderMead, Powell
|
|
253
|
-
│ ├── global_search/ # SciPy BasinHopping, DualAnnealing
|
|
254
|
-
│ ├── evolutionary/ #
|
|
264
|
+
│ ├── global_search/ # RandomSearch, SciPy BasinHopping, DualAnnealing
|
|
265
|
+
│ ├── evolutionary/ # EvoxPSO, EvoxES, Nevergrad, CMA family
|
|
255
266
|
│ ├── gradient_based/
|
|
256
267
|
│ │ ├── optax/ # 34 Optax-based optimizers (OptaxAdam, OptaxLAMB, ...)
|
|
257
|
-
│ │ ├── scipy/ # 13 SciPy-based optimizers (BFGS, TNC, SLSQP,
|
|
258
|
-
│ │ ├── custom_jax.py # Native-JAX custom/hybrid batch (SGLD, ASAM, GD
|
|
268
|
+
│ │ ├── scipy/ # 13 SciPy-based optimizers (BFGS, TNC, SLSQP, ...)
|
|
269
|
+
│ │ ├── custom_jax.py # Native-JAX custom/hybrid batch (SGLD, ASAM, GD->L-BFGS, ...)
|
|
259
270
|
│ │ └── *.py # Custom-loop algorithms (AdamGD, LBFGSGD, SAGD, NAAdamGD, OptaxLBFGS)
|
|
260
271
|
│ ├── surrogate_based/
|
|
261
272
|
│ │ ├── botorch/ # BotorchBO, BotorchTuRBO, BotorchqNEI, BotorchqKG,
|
|
@@ -337,7 +348,7 @@ benchmark.print_summary(results)
|
|
|
337
348
|
- `save_csv`: Writes a CSV with all metrics computed at evenly-spaced time points.
|
|
338
349
|
- `save_run_data`: Persists raw loss/params/time histories to NPZ files for later re-evaluation.
|
|
339
350
|
|
|
340
|
-
See [Benchmarking](
|
|
351
|
+
See [Benchmarking](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Benchmarking) for full configuration options and [Metrics Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Metrics-Reference) for what gets computed.
|
|
341
352
|
|
|
342
353
|
### Native-JAX Custom/Hybrid Batch
|
|
343
354
|
|
|
@@ -360,13 +371,13 @@ see `scripts/voyager_native_jax_custom_batch.py`.
|
|
|
360
371
|
|
|
361
372
|
The interface is designed to make this as simple as possible. You write the optimization logic; `Objective` handles everything else (timing, logging, budget enforcement, file I/O).
|
|
362
373
|
|
|
363
|
-
> **Full step-by-step tutorial:** [Implementing a New Algorithm](
|
|
374
|
+
> **Full step-by-step tutorial:** [Implementing a New Algorithm](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Implementing-a-New-Algorithm)
|
|
364
375
|
|
|
365
376
|
### The Contract
|
|
366
377
|
|
|
367
378
|
1. Subclass `OptimizationAlgorithm`
|
|
368
379
|
2. Declare `algorithm_str` and `algorithm_type`
|
|
369
|
-
3. Implement `optimize(objective, ...)
|
|
380
|
+
3. Implement `optimize(objective, ...) -> None`
|
|
370
381
|
4. Use `Objective` for all function evaluations
|
|
371
382
|
5. The `Objective` is mutated in place, thereby no return is needed
|
|
372
383
|
|
|
@@ -389,7 +400,7 @@ class MyAlgorithm(OptimizationAlgorithm):
|
|
|
389
400
|
"""My optimization algorithm."""
|
|
390
401
|
|
|
391
402
|
algorithm_str = "my_algorithm"
|
|
392
|
-
algorithm_type = AlgorithmType.
|
|
403
|
+
algorithm_type = AlgorithmType.GLOBAL_SEARCH # match one of the algorithms/ subfolders
|
|
393
404
|
|
|
394
405
|
def __init__(self, batch_size: int = 50) -> None:
|
|
395
406
|
"""Algorithm-level meta-parameters that don't change between runs."""
|
|
@@ -495,7 +506,7 @@ obj.loss_history # full loss history
|
|
|
495
506
|
obj.time_steps # elapsed time at each evaluation
|
|
496
507
|
```
|
|
497
508
|
|
|
498
|
-
See [Objective API Reference](
|
|
509
|
+
See [Objective API Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Objective-API-Reference) for the complete interface.
|
|
499
510
|
|
|
500
511
|
---
|
|
501
512
|
|
|
@@ -510,7 +521,6 @@ See [Objective API Reference](docs/Objective-API-Reference.md) for the complete
|
|
|
510
521
|
| `BFGS`, `LBFGSB`, `NonlinearCG`, `NewtonCG` | Gradient | Classical SciPy gradient and quasi-Newton methods |
|
|
511
522
|
| `TrustNCG`, `TrustKrylov`, `TrustConstr`, `Dogleg`, `SR1` | Gradient | Trust-region and constrained SciPy methods |
|
|
512
523
|
| `TNC`, `SLSQP`, `COBYQA`, `COBYLA` | Gradient | Bounded physical-space SciPy solvers |
|
|
513
|
-
| `RandomSearch` | Evolutionary | Unbiased baseline, no hyperparameters |
|
|
514
524
|
| `EvoxPSO` | Evolutionary | Swarm intelligence, many variants (CLPSO, CSO, ...) |
|
|
515
525
|
| `EvoxES` | Evolutionary | CMA-ES, OpenES, XNES, and more (EvoX backend) |
|
|
516
526
|
| `PyCMACMAES` | Evolutionary | Vanilla CMA-ES (pycma backend) |
|
|
@@ -526,6 +536,7 @@ See [Objective API Reference](docs/Objective-API-Reference.md) for the complete
|
|
|
526
536
|
| `OmadsMADS`, `OmadsOrthoMADS` | Derivative-Free | MADS / OrthoMADS direct search (OMADS) |
|
|
527
537
|
| `PDFOUOBYQA`, `PDFONEWUOA`, `PDFOLINCOA`, `PyBOBYQA` | Derivative-Free | Powell-style trust-region DFO (PDFO + Py-BOBYQA) |
|
|
528
538
|
| `NelderMead`, `Powell` | Derivative-Free | SciPy classical simplex / direction-set search |
|
|
539
|
+
| `RandomSearch` | Global Search | Unbiased, derivative-free global search baseline, no hyperparameters |
|
|
529
540
|
| `BasinHopping`, `DualAnnealing` | Global Search | SciPy stochastic global optimization |
|
|
530
541
|
| `NevergradOnePlusOne`, `NevergradTBPSA`, `NevergradNGOpt` | Evolutionary | Nevergrad rugged-landscape baselines |
|
|
531
542
|
| `BotorchBO` | Surrogate | Sample-efficient Bayesian Optimization |
|
|
@@ -538,7 +549,7 @@ See [Objective API Reference](docs/Objective-API-Reference.md) for the complete
|
|
|
538
549
|
| `ReSTIR` | Surrogate | GPU-native kNN surrogate, scales to 100k+ candidates |
|
|
539
550
|
| `VAESampling` | Generative | Latent-space compression + BO |
|
|
540
551
|
|
|
541
|
-
See [Algorithms](
|
|
552
|
+
See [Algorithms](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Algorithms) for hyperparameter details and usage examples.
|
|
542
553
|
|
|
543
554
|
---
|
|
544
555
|
|
|
@@ -554,7 +565,7 @@ Reference implementations worth reading:
|
|
|
554
565
|
- `gradient_based/adam_gd.py`: gradient-based pattern (custom loop)
|
|
555
566
|
- `gradient_based/optax/adam.py`: Optax wrapper pattern (minimal subclass)
|
|
556
567
|
- `gradient_based/scipy/_common.py`: shared SciPy wrapper, caching, and budget handling
|
|
557
|
-
- `
|
|
568
|
+
- `global_search/random_search.py`: simplest batched example
|
|
558
569
|
- `evolutionary/evox_es.py`: wrapping an external library (EvoX/PyTorch)
|
|
559
570
|
- `evolutionary/pycma_cmaes.py`: wrapping pycma (ask/tell, restart strategies)
|
|
560
571
|
- `evolutionary/jax_es.py`: native JAX ES without external library
|
|
@@ -568,13 +579,13 @@ For in-depth documentation beyond this README:
|
|
|
568
579
|
|
|
569
580
|
| Page | Content |
|
|
570
581
|
|------|---------|
|
|
571
|
-
| [Architecture Overview](
|
|
572
|
-
| [Objective API Reference](
|
|
573
|
-
| [Problems](
|
|
574
|
-
| [Algorithms](
|
|
575
|
-
| [Implementing a New Algorithm](
|
|
576
|
-
| [Benchmarking](
|
|
577
|
-
| [Metrics Reference](
|
|
578
|
-
| [Utilities & Helpers](
|
|
579
|
-
| [Installation](
|
|
580
|
-
| [FAQ](
|
|
582
|
+
| [Architecture Overview](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Architecture-Overview) | Design, module map, data-flow diagrams |
|
|
583
|
+
| [Objective API Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Objective-API-Reference) | Complete `Objective` class reference |
|
|
584
|
+
| [Problems](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Problems) | Loss computation, parameter meanings, constraints |
|
|
585
|
+
| [Algorithms](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Algorithms) | All built-in algorithms with hyperparameters |
|
|
586
|
+
| [Implementing a New Algorithm](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Implementing-a-New-Algorithm) | Full step-by-step contributor tutorial |
|
|
587
|
+
| [Benchmarking](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Benchmarking) | Running benchmarks, saving/loading results |
|
|
588
|
+
| [Metrics Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Metrics-Reference) | Every benchmark metric explained |
|
|
589
|
+
| [Utilities & Helpers](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Utilities-and-Helpers) | `t2j`/`j2t`, CLI config, inverse sigmoid |
|
|
590
|
+
| [Installation](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Installation) | Environment setup, GPU support, HPC notes |
|
|
591
|
+
| [FAQ](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/FAQ) | Common pitfalls and troubleshooting |
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
> [!IMPORTANT]
|
|
2
|
+
> **BETA RELEASE:** This repository is currently in beta. The official competition will start on **July ~7**.
|
|
3
|
+
|
|
1
4
|
# Differometor Benchmark
|
|
2
5
|
|
|
6
|
+
[](https://pypi.python.org/pypi/dfbench)
|
|
7
|
+
[](https://pypi.python.org/pypi/dfbench)
|
|
8
|
+
[](https://pypi.python.org/pypi/dfbench)
|
|
9
|
+
[](https://github.com/astral-sh/ruff)
|
|
10
|
+
[](https://github.com/artificial-scientist-lab/Differometor-Benchmark/actions/workflows/tests.yaml)
|
|
11
|
+
|
|
3
12
|
A benchmarking framework for optimization algorithms on gravitational-wave detector design problems, built on top of the [Differometor](https://github.com/artificial-scientist-lab/Differometor) simulator.
|
|
4
13
|
|
|
5
|
-
> **For detailed documentation, see the [Wiki](
|
|
14
|
+
> **For detailed documentation, see the [Wiki](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki).**
|
|
6
15
|
|
|
7
16
|
## TL;DR (I want to try my own algorithm)
|
|
8
17
|
|
|
@@ -42,7 +51,7 @@ obj.plot_loss()
|
|
|
42
51
|
obj.save_run_to_file("my_run.npz")
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
**A loss below 0 means your solution beats the real Voyager detector's sensitivity.** (On `VoyagerProblem` without physical constraints
|
|
54
|
+
**A loss below 0 means your solution beats the real Voyager detector's sensitivity.** (On `VoyagerProblem` without physical constraints, you might be burning mirrors.)
|
|
46
55
|
|
|
47
56
|
### Evaluation Methods
|
|
48
57
|
|
|
@@ -64,8 +73,8 @@ The problems are JAX-based and differentiable up to second order. Use whichever
|
|
|
64
73
|
```python
|
|
65
74
|
from dfbench import t2j, j2t
|
|
66
75
|
|
|
67
|
-
params_jax = t2j(params_torch) # Torch
|
|
68
|
-
losses_torch = j2t(obj.vmap_value(params_jax)) # JAX
|
|
76
|
+
params_jax = t2j(params_torch) # Torch -> JAX
|
|
77
|
+
losses_torch = j2t(obj.vmap_value(params_jax)) # JAX -> Torch
|
|
69
78
|
```
|
|
70
79
|
|
|
71
80
|
This adds negligible overhead compared to the objective function itself.
|
|
@@ -81,11 +90,11 @@ This adds negligible overhead compared to the objective function itself.
|
|
|
81
90
|
|
|
82
91
|
Both constrained problems accept a `power_penalty_fn(value, threshold)` callable to control how power-constraint violations are penalized. Built-in presets: `squashed_relu_penalty` (default), `relu_penalty`, `zero_penalty`. Feel free to try own ones. The penalty function can also be swapped after construction via `obj.set_penalty_fn(fn)` (before `obj.start_logging()`), which re-traces the objective so the change takes effect. The unconstrained Voyager problems reject this call because they have no power-constraint path.
|
|
83
92
|
|
|
84
|
-
Constrained problems also expose aux diagnostics. `obj.value_aux(params)` and `obj.vmap_value_aux(batch)` return `(loss, aux)` where `aux` carries the loss decomposition, a physical `is_feasible` flag, per-constraint violations, and the raw per-group power arrays. Enable `save` tokens like `is_feasible`, `power_values`, or the `aux` alias and the standard `obj.value` / `obj.value_and_grad` loop records the enabled aux fields in the same forward pass, with no code change. See [Problems](
|
|
93
|
+
Constrained problems also expose aux diagnostics. `obj.value_aux(params)` and `obj.vmap_value_aux(batch)` return `(loss, aux)` where `aux` carries the loss decomposition, a physical `is_feasible` flag, per-constraint violations, and the raw per-group power arrays. Enable `save` tokens like `is_feasible`, `power_values`, or the `aux` alias and the standard `obj.value` / `obj.value_and_grad` loop records the enabled aux fields in the same forward pass, with no code change. See [Problems](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Problems) for the aux schema and [Objective API Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Objective-API-Reference) for the full method set.
|
|
85
94
|
|
|
86
95
|
All problems also support `bounds_overrides` (e.g. `{"tuning": (0, 45)}`) to narrow default property bounds and `signal_floor` to floor detector signal magnitudes before sensitivity normalization. `signal_floor` defaults to `1e-20`. Use `problem.print_bounds()` to inspect effective bounds.
|
|
87
96
|
|
|
88
|
-
See [Problems](
|
|
97
|
+
See [Problems](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Problems) for details on loss computation, parameter meanings, and constraints.
|
|
89
98
|
|
|
90
99
|
---
|
|
91
100
|
|
|
@@ -122,7 +131,7 @@ pip install -e . # CPU-only editable install
|
|
|
122
131
|
pip install -e ".[all,cuda13,analysis]" # All backends, CUDA 13, and analysis extras
|
|
123
132
|
```
|
|
124
133
|
|
|
125
|
-
See [Installation](
|
|
134
|
+
See [Installation](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Installation) for GPU setup details and HPC notes.
|
|
126
135
|
|
|
127
136
|
---
|
|
128
137
|
|
|
@@ -133,8 +142,8 @@ OptimizationAlgorithm.optimize()
|
|
|
133
142
|
│
|
|
134
143
|
▼
|
|
135
144
|
┌───────────┐ records losses, params, grads, timestamps
|
|
136
|
-
│ Objective │
|
|
137
|
-
└─────┬─────┘ bounded
|
|
145
|
+
│ Objective │ ──> enforces time / eval budgets
|
|
146
|
+
└─────┬─────┘ bounded <-> unbounded sigmoid transform
|
|
138
147
|
│
|
|
139
148
|
▼
|
|
140
149
|
ContinuousProblem (VoyagerProblem, VoyagerTuningProblem, ConstrainedVoyagerProblem, UIFOProblem)
|
|
@@ -145,7 +154,7 @@ OptimizationAlgorithm.optimize()
|
|
|
145
154
|
|
|
146
155
|
**Design Idea:** Algorithms never create their own `Objective`, they receive a pre-configured one. This lets the benchmark harness or user script control budgets, seeds, and history settings uniformly. The algorithm only has to implement its optimization logic.
|
|
147
156
|
|
|
148
|
-
See [Architecture Overview](
|
|
157
|
+
See [Architecture Overview](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Architecture-Overview) for full design details.
|
|
149
158
|
|
|
150
159
|
---
|
|
151
160
|
|
|
@@ -157,15 +166,15 @@ src/dfbench/
|
|
|
157
166
|
│ ├── problem.py # ContinuousProblem ABC + ProblemSpec
|
|
158
167
|
│ ├── algorithm.py # OptimizationAlgorithm ABC + AlgorithmType enum
|
|
159
168
|
│ ├── objective.py # Objective wrapper (central piece)
|
|
160
|
-
│ └── utils.py # torch
|
|
169
|
+
│ └── utils.py # torch<->jax conversion, inverse sigmoid
|
|
161
170
|
├── algorithms/
|
|
162
171
|
│ ├── derivative_free/ # OMADS, PDFO/Py-BOBYQA, NelderMead, Powell
|
|
163
|
-
│ ├── global_search/ # SciPy BasinHopping, DualAnnealing
|
|
164
|
-
│ ├── evolutionary/ #
|
|
172
|
+
│ ├── global_search/ # RandomSearch, SciPy BasinHopping, DualAnnealing
|
|
173
|
+
│ ├── evolutionary/ # EvoxPSO, EvoxES, Nevergrad, CMA family
|
|
165
174
|
│ ├── gradient_based/
|
|
166
175
|
│ │ ├── optax/ # 34 Optax-based optimizers (OptaxAdam, OptaxLAMB, ...)
|
|
167
|
-
│ │ ├── scipy/ # 13 SciPy-based optimizers (BFGS, TNC, SLSQP,
|
|
168
|
-
│ │ ├── custom_jax.py # Native-JAX custom/hybrid batch (SGLD, ASAM, GD
|
|
176
|
+
│ │ ├── scipy/ # 13 SciPy-based optimizers (BFGS, TNC, SLSQP, ...)
|
|
177
|
+
│ │ ├── custom_jax.py # Native-JAX custom/hybrid batch (SGLD, ASAM, GD->L-BFGS, ...)
|
|
169
178
|
│ │ └── *.py # Custom-loop algorithms (AdamGD, LBFGSGD, SAGD, NAAdamGD, OptaxLBFGS)
|
|
170
179
|
│ ├── surrogate_based/
|
|
171
180
|
│ │ ├── botorch/ # BotorchBO, BotorchTuRBO, BotorchqNEI, BotorchqKG,
|
|
@@ -247,7 +256,7 @@ benchmark.print_summary(results)
|
|
|
247
256
|
- `save_csv`: Writes a CSV with all metrics computed at evenly-spaced time points.
|
|
248
257
|
- `save_run_data`: Persists raw loss/params/time histories to NPZ files for later re-evaluation.
|
|
249
258
|
|
|
250
|
-
See [Benchmarking](
|
|
259
|
+
See [Benchmarking](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Benchmarking) for full configuration options and [Metrics Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Metrics-Reference) for what gets computed.
|
|
251
260
|
|
|
252
261
|
### Native-JAX Custom/Hybrid Batch
|
|
253
262
|
|
|
@@ -270,13 +279,13 @@ see `scripts/voyager_native_jax_custom_batch.py`.
|
|
|
270
279
|
|
|
271
280
|
The interface is designed to make this as simple as possible. You write the optimization logic; `Objective` handles everything else (timing, logging, budget enforcement, file I/O).
|
|
272
281
|
|
|
273
|
-
> **Full step-by-step tutorial:** [Implementing a New Algorithm](
|
|
282
|
+
> **Full step-by-step tutorial:** [Implementing a New Algorithm](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Implementing-a-New-Algorithm)
|
|
274
283
|
|
|
275
284
|
### The Contract
|
|
276
285
|
|
|
277
286
|
1. Subclass `OptimizationAlgorithm`
|
|
278
287
|
2. Declare `algorithm_str` and `algorithm_type`
|
|
279
|
-
3. Implement `optimize(objective, ...)
|
|
288
|
+
3. Implement `optimize(objective, ...) -> None`
|
|
280
289
|
4. Use `Objective` for all function evaluations
|
|
281
290
|
5. The `Objective` is mutated in place, thereby no return is needed
|
|
282
291
|
|
|
@@ -299,7 +308,7 @@ class MyAlgorithm(OptimizationAlgorithm):
|
|
|
299
308
|
"""My optimization algorithm."""
|
|
300
309
|
|
|
301
310
|
algorithm_str = "my_algorithm"
|
|
302
|
-
algorithm_type = AlgorithmType.
|
|
311
|
+
algorithm_type = AlgorithmType.GLOBAL_SEARCH # match one of the algorithms/ subfolders
|
|
303
312
|
|
|
304
313
|
def __init__(self, batch_size: int = 50) -> None:
|
|
305
314
|
"""Algorithm-level meta-parameters that don't change between runs."""
|
|
@@ -405,7 +414,7 @@ obj.loss_history # full loss history
|
|
|
405
414
|
obj.time_steps # elapsed time at each evaluation
|
|
406
415
|
```
|
|
407
416
|
|
|
408
|
-
See [Objective API Reference](
|
|
417
|
+
See [Objective API Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Objective-API-Reference) for the complete interface.
|
|
409
418
|
|
|
410
419
|
---
|
|
411
420
|
|
|
@@ -420,7 +429,6 @@ See [Objective API Reference](docs/Objective-API-Reference.md) for the complete
|
|
|
420
429
|
| `BFGS`, `LBFGSB`, `NonlinearCG`, `NewtonCG` | Gradient | Classical SciPy gradient and quasi-Newton methods |
|
|
421
430
|
| `TrustNCG`, `TrustKrylov`, `TrustConstr`, `Dogleg`, `SR1` | Gradient | Trust-region and constrained SciPy methods |
|
|
422
431
|
| `TNC`, `SLSQP`, `COBYQA`, `COBYLA` | Gradient | Bounded physical-space SciPy solvers |
|
|
423
|
-
| `RandomSearch` | Evolutionary | Unbiased baseline, no hyperparameters |
|
|
424
432
|
| `EvoxPSO` | Evolutionary | Swarm intelligence, many variants (CLPSO, CSO, ...) |
|
|
425
433
|
| `EvoxES` | Evolutionary | CMA-ES, OpenES, XNES, and more (EvoX backend) |
|
|
426
434
|
| `PyCMACMAES` | Evolutionary | Vanilla CMA-ES (pycma backend) |
|
|
@@ -436,6 +444,7 @@ See [Objective API Reference](docs/Objective-API-Reference.md) for the complete
|
|
|
436
444
|
| `OmadsMADS`, `OmadsOrthoMADS` | Derivative-Free | MADS / OrthoMADS direct search (OMADS) |
|
|
437
445
|
| `PDFOUOBYQA`, `PDFONEWUOA`, `PDFOLINCOA`, `PyBOBYQA` | Derivative-Free | Powell-style trust-region DFO (PDFO + Py-BOBYQA) |
|
|
438
446
|
| `NelderMead`, `Powell` | Derivative-Free | SciPy classical simplex / direction-set search |
|
|
447
|
+
| `RandomSearch` | Global Search | Unbiased, derivative-free global search baseline, no hyperparameters |
|
|
439
448
|
| `BasinHopping`, `DualAnnealing` | Global Search | SciPy stochastic global optimization |
|
|
440
449
|
| `NevergradOnePlusOne`, `NevergradTBPSA`, `NevergradNGOpt` | Evolutionary | Nevergrad rugged-landscape baselines |
|
|
441
450
|
| `BotorchBO` | Surrogate | Sample-efficient Bayesian Optimization |
|
|
@@ -448,7 +457,7 @@ See [Objective API Reference](docs/Objective-API-Reference.md) for the complete
|
|
|
448
457
|
| `ReSTIR` | Surrogate | GPU-native kNN surrogate, scales to 100k+ candidates |
|
|
449
458
|
| `VAESampling` | Generative | Latent-space compression + BO |
|
|
450
459
|
|
|
451
|
-
See [Algorithms](
|
|
460
|
+
See [Algorithms](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Algorithms) for hyperparameter details and usage examples.
|
|
452
461
|
|
|
453
462
|
---
|
|
454
463
|
|
|
@@ -464,7 +473,7 @@ Reference implementations worth reading:
|
|
|
464
473
|
- `gradient_based/adam_gd.py`: gradient-based pattern (custom loop)
|
|
465
474
|
- `gradient_based/optax/adam.py`: Optax wrapper pattern (minimal subclass)
|
|
466
475
|
- `gradient_based/scipy/_common.py`: shared SciPy wrapper, caching, and budget handling
|
|
467
|
-
- `
|
|
476
|
+
- `global_search/random_search.py`: simplest batched example
|
|
468
477
|
- `evolutionary/evox_es.py`: wrapping an external library (EvoX/PyTorch)
|
|
469
478
|
- `evolutionary/pycma_cmaes.py`: wrapping pycma (ask/tell, restart strategies)
|
|
470
479
|
- `evolutionary/jax_es.py`: native JAX ES without external library
|
|
@@ -478,13 +487,13 @@ For in-depth documentation beyond this README:
|
|
|
478
487
|
|
|
479
488
|
| Page | Content |
|
|
480
489
|
|------|---------|
|
|
481
|
-
| [Architecture Overview](
|
|
482
|
-
| [Objective API Reference](
|
|
483
|
-
| [Problems](
|
|
484
|
-
| [Algorithms](
|
|
485
|
-
| [Implementing a New Algorithm](
|
|
486
|
-
| [Benchmarking](
|
|
487
|
-
| [Metrics Reference](
|
|
488
|
-
| [Utilities & Helpers](
|
|
489
|
-
| [Installation](
|
|
490
|
-
| [FAQ](
|
|
490
|
+
| [Architecture Overview](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Architecture-Overview) | Design, module map, data-flow diagrams |
|
|
491
|
+
| [Objective API Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Objective-API-Reference) | Complete `Objective` class reference |
|
|
492
|
+
| [Problems](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Problems) | Loss computation, parameter meanings, constraints |
|
|
493
|
+
| [Algorithms](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Algorithms) | All built-in algorithms with hyperparameters |
|
|
494
|
+
| [Implementing a New Algorithm](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Implementing-a-New-Algorithm) | Full step-by-step contributor tutorial |
|
|
495
|
+
| [Benchmarking](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Benchmarking) | Running benchmarks, saving/loading results |
|
|
496
|
+
| [Metrics Reference](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Metrics-Reference) | Every benchmark metric explained |
|
|
497
|
+
| [Utilities & Helpers](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Utilities-and-Helpers) | `t2j`/`j2t`, CLI config, inverse sigmoid |
|
|
498
|
+
| [Installation](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/Installation) | Environment setup, GPU support, HPC notes |
|
|
499
|
+
| [FAQ](https://github.com/artificial-scientist-lab/Differometor-Benchmark/wiki/FAQ) | Common pitfalls and troubleshooting |
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
## `EvoxES
|
|
21
|
+
## `EvoxES`: Multi-Algorithm Wrapper (on `main`)
|
|
22
22
|
|
|
23
23
|
`EvoxES` is a single class that wraps **12 distinct EvoX evolution strategies** selectable via its `variant` parameter.
|
|
24
24
|
Each variant is a separate algorithm from the EvoX library.
|
|
@@ -38,7 +38,7 @@ Each variant is a separate algorithm from the EvoX library.
|
|
|
38
38
|
| `GuidedES` | Guided Evolution Strategy | ES |
|
|
39
39
|
| `ESMC` | Evolution Strategy with Monte Carlo | ES |
|
|
40
40
|
|
|
41
|
-
## `EvoxPSO
|
|
41
|
+
## `EvoxPSO`: Multi-Algorithm Wrapper (on `main`)
|
|
42
42
|
|
|
43
43
|
`EvoxPSO` is a single class that wraps **7 distinct EvoX PSO variants** selectable via its `variant` parameter.
|
|
44
44
|
|
|
@@ -52,10 +52,10 @@ Each variant is a separate algorithm from the EvoX library.
|
|
|
52
52
|
| `SLPSOGS` | Social Learning PSO with Gaussian Sampling |
|
|
53
53
|
| `SLPSOUS` | Social Learning PSO with Uniform Sampling |
|
|
54
54
|
|
|
55
|
-
## `EvosaxES
|
|
55
|
+
## `EvosaxES`: Multi-Algorithm Wrapper (on `algorithm/evo-algorithms`)
|
|
56
56
|
|
|
57
57
|
`EvosaxES` is a separate evosax-backed wrapper (pure JAX, JIT-friendly) that wraps **14 variants**.
|
|
58
|
-
Coexists with `EvoxES`
|
|
58
|
+
Coexists with `EvoxES` but uses a different backend; class names use `evosax_` prefix.
|
|
59
59
|
|
|
60
60
|
| Variant | Full Name | Type |
|
|
61
61
|
|---------|-----------|------|
|
|
@@ -129,7 +129,7 @@ Coexists with `EvoxES` — different backend, class names use `evosax_` prefix.
|
|
|
129
129
|
|-----------|-----------|--------|--------|-------|
|
|
130
130
|
| SGLD | `SGLDJAX` | Branch | `algorithm/jax-algorithms` | Stochastic Gradient Langevin Dynamics |
|
|
131
131
|
| ASAM | `ASAMJAX` | Branch | `algorithm/jax-algorithms` | Adaptive Sharpness-Aware Minimization |
|
|
132
|
-
| Adam
|
|
132
|
+
| Adam->L-BFGS Switch | `AdamToLBFGSJAX` | Branch | `algorithm/jax-algorithms` | Hybrid warm-start strategy |
|
|
133
133
|
| Entropy-SGD | `EntropySGDJAX` | Branch | `algorithm/jax-algorithms` | |
|
|
134
134
|
| SGHMC | `SGHMCJAX` | Branch | `algorithm/jax-algorithms` | Stochastic Gradient Hamiltonian MC |
|
|
135
135
|
| ARC | `ARCJAX` | Branch | `algorithm/jax-algorithms` | Adaptive Regularization with Cubics |
|
|
@@ -146,7 +146,6 @@ Coexists with `EvoxES` — different backend, class names use `evosax_` prefix.
|
|
|
146
146
|
|-----------|-----------|--------|--------|-------|
|
|
147
147
|
| EvoX ES (12 variants) | `EvoxES` | **Finished** | `main` | See variant table above |
|
|
148
148
|
| EvoX PSO (7 variants) | `EvoxPSO` | **Finished** | `main` | See variant table above |
|
|
149
|
-
| Random Search | `RandomSearch` | **Finished** | `main` | Baseline |
|
|
150
149
|
| Evosax ES (14 variants) | `EvosaxES` | Branch | `algorithm/evo-algorithms` | See variant table above |
|
|
151
150
|
| DE | `DE` | Branch | `algorithm/evo-algorithms` | Differential Evolution (custom impl) |
|
|
152
151
|
| JADE | `JADE` | Branch | `algorithm/evo-algorithms` | Adaptive DE |
|
|
@@ -201,6 +200,7 @@ Coexists with `EvoxES` — different backend, class names use `evosax_` prefix.
|
|
|
201
200
|
|-----------|-----------|--------|--------|-------|
|
|
202
201
|
| Basin Hopping | `BasinHopping` | Branch | `algorithm/scipy-nongrad-algorithms` | SciPy stochastic global optimizer |
|
|
203
202
|
| Dual Annealing | `DualAnnealing` | Branch | `algorithm/scipy-nongrad-algorithms` | SciPy stochastic global optimizer |
|
|
203
|
+
| Random Search | `RandomSearch` | **Finished** | `main` | Baseline |
|
|
204
204
|
|
|
205
205
|
### Surrogate-Based / Bayesian Optimization
|
|
206
206
|
|
|
@@ -214,7 +214,7 @@ Coexists with `EvoxES` — different backend, class names use `evosax_` prefix.
|
|
|
214
214
|
| GEBO | `GEBO` | Branch | `algorithm/bo-algorithms` | Gradient-Enhanced BO |
|
|
215
215
|
| LineBO | `LineBO` | Branch | `algorithm/bo-algorithms` | Line-search BO |
|
|
216
216
|
| qKG | `BotorchqKG` | Branch | `algorithm/bo-algorithms` | Knowledge Gradient |
|
|
217
|
-
| qNEI | `
|
|
217
|
+
| qNEI | `BotorchQNEI` | Branch | `algorithm/bo-algorithms` | Noisy Expected Improvement |
|
|
218
218
|
| REMBO | `REMBO` | Branch | `algorithm/bo-algorithms` | Random Embedding BO |
|
|
219
219
|
| HEBO | `HEBO` | Branch | `algorithm/bo-algorithms` | Heteroscedastic BO |
|
|
220
220
|
| SMAC | `SMAC` | Branch | `algorithm/bo-algorithms` | Sequential Model-based Config |
|