feat(bo): batch, asynchronous, constrained and integer Bayesian optimization, completing batch B - #415
Merged
Conversation
A model conditioned on points with given values, its kernel's hyperparameters and standardization kept and its constant mean estimated again: what batch and asynchronous Bayesian optimization add for the points not yet evaluated. The unit-cube map takes any bounds, for integer genes too.
Incremental gains prepare, wants and receive_evaluation, defaulted as on Algorithm: the engine asks the fitness function for the wanted extras with buffers per worker, applies the NaN policy to them, and hands them over with the fitness.
…osals Bo chooses q points per generation by the Kriging believer or the constant liar (Ginsbourger, Le Riche and Carraro, 2010), weighs its acquisition by the probability of feasibility under a Gaussian process per constraint (Gardner et al., 2014), searches Integer genomes on their lattice with the genes rounded inside the kernel (Garrido-Merchán and Hernández-Lobato, 2020), and proposes points to an AsyncEngine with the pending ones fantasized.
The fantasies' mechanism and batches on Branin, the same bits on 1, 2 and 8 threads, one worker's asynchronous run reproducible, a checkpoint's pending points proposed again after resuming, the toy problem of Gramacy et al. (2016) and CEC 2006's G24 by their constraints' values, an integer quadratic's lattice minimum, and portable runs of each. The toy problem's minimum comes from a reference script with mpmath.
Under an AsyncEngine every proposal has the points being evaluated fantasized, and the lowest lie keeps their region at the best value: Hartmann 3 reached f* + 1e-4 in 2 runs of 5 with 4 workers, against 5 of 5 with the believer, which batches find as good as the lowest lie.
batch and fantasy settings, readable and settable in control; run(..., constraints=m) with a fitness function that returns (value, g), and the constraints of the test problems evaluated in Rust; Integer genomes; RunningBo.probability_of_feasibility_at.
…zation bo_hartmann6: 4 points a round in parallel to within 1e-4 of Hartmann 6's minimum in 15 rounds, against 36 one point a round. bo_asynchronous: an AsyncEngine of 4 workers on evaluations of 10 to 50 ms, against batches waiting for their slowest. bo_constrained: Gramacy et al.'s toy problem to within 1e-5 by the probability of feasibility, against the same search told only the violation. The surrogate plot takes its panels' titles from the trace.
…s for bo `batch`, `fantasy` and `asynchronous` settings; `fitness.constraints` without `fitness.gradient`, a program writing the value and then the constraints' values; integer genomes. docs/cli.md describes them.
…yesian optimization AGENTS.md's section with a program for each, the README, docs/features.md, the crate docs' table, llms.txt, the Python README and the ROADMAP's 0.13 item ticked; the plan's status with the sources read for batch B's second part and where the implementation differs from its notes.
…them A run whose fitness function gives constraints, after evaluations told by hand without their values, is an error instead of an index out of bounds. Also the clippy findings, the CLI test of the built-in program's constraints and the Python docstring example's import.
Merged
tachsin
added a commit
that referenced
this pull request
Oct 2, 2026
## 🤖 New release * `genoxide`: 0.12.0 -> 0.13.0 (✓ API compatible changes) * `genoxide-python`: 0.12.0 -> 0.13.0 <details><summary><i><b>Changelog</b></i></summary><p> ## `genoxide` <blockquote> ## [0.13.0](v0.12.0...v0.13.0) - 2026-10-02 ### <!-- 0 -->Added - *(bo)* Bayesian optimization with a Gaussian process model, log-EI and a Latin hypercube design ([#382](#382)) - *(bo)* batch, asynchronous, constrained and integer Bayesian optimization, completing batch B ([#415](#415)) ### <!-- 4 -->Documentation - correct citations found in an audit of every reference ([#412](#412)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: tachsin <tachsinachmet@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second part of batch B in the optimization plan, after #382: Bayesian optimization in batches, asynchronously, with constraints, and on integer genes.
Batches:
.batch(q)with.fantasy(bo::Fantasy::KrigingBeliever), the default, orConstantLiar(Lie::Min | Mean | Max)(Ginsbourger, Le Riche and Carraro 2010, Algorithms 1 and 2, checked).GaussianProcess::with_points. Hyperparameters are not refit within a batch.Engine::parallel(true), a batch is evaluated in parallel, with the same bits on any number of threads.batch(1)reproduces single-point runs bit for bit.AsyncEngineit reached Hartmann 3 in 5 of 5 runs, against 2 of 5 for the lowest lie.Asynchronous:
BoimplementsIncremental, soAsyncEngineproposes a point while others are pending, with the pending points fantasized. A checkpoint holds them, and a resumed run matches an uninterrupted one.Incrementalgains defaultedprepare,wantsandreceive_evaluation, andAsyncEngineevaluates the wanted extras.Constraints (Gardner et al. 2014, checked):
Constrainedor a problem's own. Each constraint gets its own GP.Integer genes:
Bo<R: bo::Space = Real>, withSpaceimplemented forRealandInteger.Converged.In Python and the CLI:
gx.Bo(..., batch=, fantasy=),run(f, constraints=m), and integer genomes.batch,fantasy,asynchronous = true, integer genomes, and constraint values from fitness programs.Examples (Rust and Python identical, except the asynchronous one):
bo_hartmann6: batches of 4 come within 1e-4 of the global minimum in 15 rounds (74 evaluations), against 36 rounds one point at a time. The global minimum depends on the seed: batches reach it in 13 of 20 seeds and single points in 12 of 20, the rest stopping at the local minimum −3.2032. The README says so.bo_constrained: Gramacy et al.'s toy problem. It comes within 1e-5 of f* = 0.5997880520 (checked with mpmath and a grid scan) in 21 evaluations, and every one of 20 seeds within 39. Given only the total violation, the same search ends 0.34 above.bo_asynchronous(Rust only): Hartmann 3 to 1e-4 with 4 workers and evaluations of 10-50 ms, in about 0.4 s, against 0.8 s for batches of 4. Its timings are masked in CI.Tests:
portable_runsentries and Python tests.