Skip to content

Releases: M-Colley/botorch-rust

botorch-rust 0.3.1rc2 — decision/FPBI preview (Windows x64)

Choose a tag to compare

@M-Colley M-Colley released this 22 Oct 07:50

Experimental Windows x64 preview / release candidate 0.3.1rc2, from unmerged PR #4. Runtime and wheel METADATA both report 0.3.1rc2; Cargo uses 0.3.1-rc2. Stable 0.3.0 and PyPI are unchanged.

Source commit: 7100519
Review: #4

Includes knee-region/preference selection, FPBI geometry, native constrained FPBI sampling, Torch/SciPy and BoTorch-model adapters, diagnostics, bounded CUDA comparison tiles, and native grid/nadir edge-case fixes.

RC2 corrects two issues discovered by actual RC1 platform CI: standalone Tensor geometry now works with all SciPy imports blocked, and the dependency-free subprocess test uses the package actually installed instead of assuming a source layout. The original task source and the installed RC2 wheel both pass all 25 decision tests, with no deselections. RC1 and the failed CI runs are retained for traceability.

Fresh Python 3.13 verification ran without Torch, NumPy or SciPy. Python 3.14 verification used existing Torch 2.14.1+cpu, BoTorch 0.18.1 and SciPy 1.18.1; it additionally tested Tensor geometry in a separate process with every SciPy import blocked. All 369 RECORD entries and 364 Python/stub/marker files were verified against the clean review tree. The wheel declares CPython 3.11+ abi3 compatibility; local execution covered 3.13 and 3.14.

CI Python lint passes; the full platform run is tracked separately and may still be running at publication: https://github.com/M-Colley/botorch-rust/actions/runs/39742309291. Local installed-wheel validation and cross-platform CI are distinct evidence.

Download the wheel and check SHA256SUMS. Native nested-list use needs no extras; continuous Tensor FPBI needs the decision extra (Torch, NumPy, SciPy). FPBI remains experimental local multistart optimization, with no global Pareto or safety guarantee. See the attached validation/provenance and feature evidence guide for what worked, failed, and remains limited.

This tag is outside v*, so it does not trigger the stable/PyPI workflow. No global installation, merge, stable asset replacement or PyPI publication was performed.

Previous preview retained: https://github.com/M-Colley/botorch-rust/releases/tag/decision-fpbi-v0.3.1rc1

botorch-rust 0.3.1rc1 — decision/FPBI preview (Windows x64)

Choose a tag to compare

@M-Colley M-Colley released this 22 Oct 07:34

Experimental Windows x64 preview / release candidate 0.3.1rc1 for the decision-making and FPBI feature branch. This is not a stable or PyPI release. Wheel metadata and runtime both report 0.3.1rc1 (Cargo 0.3.1-rc1); this is distinct from the existing stable 0.3.0 release. The preview tag identifies the exact feature commit.

Includes knee-region/preference selection, FPBI geometry, native constrained FPBI sampling, Torch/SciPy and BoTorch-model adapters, solver diagnostics, bounded CUDA comparison tiles, and the two native edge-case fixes.

Source commit: deb33c9. Review: #4

Verified on fresh Python 3.13 without Torch/NumPy/SciPy and on Python 3.14 with existing Torch 2.14.1+cpu/BoTorch 0.18.1/SciPy 1.18.1. The wheel declares CPython 3.11+ abi3 compatibility; this local validation used 3.13 and 3.14. No global install was performed. CUDA selector checks and descriptive timing results are documented in the feature evidence guide; this wheel-installation check used CPU.

Download the Windows wheel and verify SHA256SUMS before installing it in your own environment. Native nested-list use needs no extras. Torch-facing continuous FPBI needs the decision extra (Torch, NumPy, SciPy).

FPBI uses local multistart optimization. Accepted solutions satisfy independently checked constraints, but no global Pareto or safety guarantee is made. All comparison results and known failures/limitations are documented in docs/decision-making-evidence.md on the feature branch. The source patch, source/commit provenance, verification scripts and machine-readable validation are attached.

Local installed-wheel checks and an independent artifact audit passed. CI Python lint also passes (Ruff on 759 configured files, Mypy on 363 source files); the remaining cross-platform jobs were still running at upload time: https://github.com/M-Colley/botorch-rust/actions/runs/39740936408. The initial native-stub formatting failure was corrected before packaging; its earlier run remains visible in the validation record.

This preview tag deliberately does not match v*, so the repository's tag-triggered stable/PyPI publication workflow is not invoked. No merge or PyPI publication is part of this preview.

Update: platform CI subsequently found an eager SciPy import for standalone Tensor geometry and an installed-test package-path issue. RC1 with its declared decision extra and native list path remains verified. RC2 supersedes this preview and includes the lazy import, portable test path and a blocked-SciPy regression: https://github.com/M-Colley/botorch-rust/releases/tag/decision-fpbi-v0.3.1rc2. RC1 assets remain unchanged for traceability. Details: https://github.com/M-Colley/botorch-rust/actions/runs/39740936408

botorch-rust v0.3.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 22:32
cd2b490

The main BoTorch implementation now includes the specialized, empirical, variational and fully Bayesian models; CPU/CUDA NUTS; entropy/search, hypervolume and lookahead acquisitions; fitting and candidate generation; and public model, likelihood, transform, sampler and path protocols.

The base package computes natively in Rust on CPU without required Python dependencies. The optional Tensor backend computes on the supplied CPU/CUDA device in float32/float64 and preserves PyTorch first and higher derivatives through training data, queries and model Parameters. Models and acquisitions do not delegate to upstream BoTorch.

This update repairs registered outcome-buffer authority, live task mappings, sampled Warp precision/normalization, conditioning ownership and data graphs, fixed/learned noise separation, public Gaussian posterior interoperability and noisy-hypervolume sampler registration. Native exact predictions reuse fitted factors, and native latent Kronecker inference supports CG/Lanczos.

Validation against pinned BoTorch b0dd01be61d517c387e234903a6e2cc38c057ea2:

  • 14,509 Python passes and 51 skips, including 1,222 equivalence passes and 15 skips. Every canonical collected case is accounted for, with stable source, installed-wheel, native, verifier and reference fingerprints.
  • 551 Rust tests and 3 doctests, strict Clippy and formatting pass.
  • With reference dependencies blocked: 4,154 passed, 2,777 case skips, all 6,931 collected IDs accounted for. The 146 module collection skips are recorded separately.
  • Pinned public API inventory 776/776; Ruff checks 751 files and both Mypy configurations check 357 files. All eleven cross-platform CI jobs passed at the original source checkpoint 258ff6b (run 39674851321).

The verification and backend guide records exact artifacts, configurations and numerical checks. botorch_community is outside this release. Structured Tensor models may use dense exact algebra; native and Tensor routes have distinct performance characteristics. A bounded single-thread CPU float64 warm-prediction benchmark measures 4.03x and 3.75x speedups at 32 and 256 training points; 1,024 points is effectively equal (1.02x). These timings cover prediction only and do not establish a universal speedup.

Install on CPython 3.11 or newer:

python -m pip install --upgrade botorch-rust==0.3.0

For device execution, install the optional torch extra and select backend="torch"; CUDA training tensors select that route automatically.

Upstream correctness submissions link proposed fixes and reused PRs. Mark reviewed and submitted the tested L-BFGS-B patch in SciPy #26458; human review and submission are complete, and the proposed repair awaits upstream review.

Post-release verification: PR #2 repairs two equivalence fixtures and adds 20 controls. It changes only tests, helpers and documentation; the released runtime and v0.3.0 tag remain at cd2b490.

Against the actual published Windows wheel, each fresh Torch 2.13.0 and Torch 2.14.1 CPU recheck accounts for all 1,237 original cases: 1,222 passed and the same 15 documented inapplicable/reference-limited cases skipped. All 20 new guards passed, giving 1,242 passes and 15 skips per profile. Exact case/skip checks and before/after runtime, reference, dependency and test fingerprints passed. Tests at cc4ca5e have the same Git tree as merged main e73f4e7.

All eleven merged-main CI jobs also pass: the broad suite has 10,054 passes and 1,171 skips; equivalence has 1,242 passes and 15 skips. These overlapping rechecks are separate from the earlier full release audit. The legacy equivalence fixtures execute on CPU, including in the CUDA-capable Torch 2.13 environment; actual CUDA and higher-derivative evidence is recorded separately in the release and Unity verification. The IID forward comparisons use positive-definite joint fixtures; duplicate-query cases are fixture-rejection controls. The earlier failed CI repeat remains preserved and is resolved by PR #2.

botorch-rust v0.2.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 22:02

Second release of botorch-rust: a Rust implementation of BoTorch with the same Python API (import botorch_rs instead of import botorch), tested for equivalence against BoTorch.

Install

pip install --upgrade botorch-rust

Prebuilt abi3 wheels for CPython 3.11 and later, tested on 3.11, 3.14 and 3.15 (Windows x86_64, macOS arm64 and x86_64, Linux x86_64 and aarch64; no Rust toolchain needed), on PyPI and attached below. NumPy and PyTorch remain optional.

What is new

Coverage grew from 222 to 398 of BoTorch's 776 public classes and functions (51%) (coverage report, roadmap):

  • Single-objective acquisition (details):
    • the knowledge gradient (also multi-fidelity), qNEI, qLCB and qPSD;
    • analytic noisy EI and LogNEI, LogProbabilityOfFeasibility, ScalarizedPosteriorMean and qAnalyticPI;
    • max-value entropy search and GIBBON (also multi-fidelity), joint and predictive entropy search;
    • Thompson sampling and qNegIntegratedPosteriorVariance;
    • the penalized, proximal, prior-guided and fixed-feature wrappers.
  • Kernels, priors and constraints (details):
    • kernel trees (sums, products, scales, active_dims) in SingleTaskGP;
    • GPyTorch's RBF, Matérn, RQ, periodic, linear, polynomial, cosine and index kernels;
    • BoTorch's own kernels;
    • Normal, uniform, half-Cauchy, half-normal, LKJ, Beta and smoothed-box priors.
  • Input and outcome transforms (details):
    • all 35 names of botorch.models.transforms, including the learned Warp and LearnedFeatureImputation (fitted jointly with the GP);
    • Log, Power, Bilog and StratifiedStandardize, with TransformedPosterior.
  • Models:
    • multi-task: MultiTaskGP and KroneckerMultiTaskGP;
    • the rest: SingleTaskMultiFidelityGP, MixedSingleTaskGP, the MAP SAAS models, EnsembleModel, AffineDeterministicModel, FixedSingleSampleModel, ModelList / ModelDict and OrthogonalAdditiveGP;
    • subset_output and construct_inputs.
  • Optimization and candidate generation (details):
    • optimize_acqf_mixed (also alternating), optimize_acqf_discrete (also with local search), optimize_acqf_cyclic and optimize_acqf_homotopy;
    • gen_candidates_torch, sample_around_best, post_processing_func and timeout_sec;
    • MaxPosteriorSampling and BoltzmannSampling;
    • fitting with torch optimizers, and batch_cross_validation.

Behaviour changes

  • Fits at extreme hyperparameters now take BoTorch's path (details):
    • botorch-rust reproduces GPyTorch's NaN and infinite losses, so L-BFGS-B backtracks as in BoTorch. Before, some fits raised InvalidArgumentError or ended in a different optimum.
    • Cholesky factorizations try jitter up to 1e-3, as BoTorch configures linear_operator.
  • Gradients exactly at clamp bounds follow PyTorch ≥ 2.14 (pytorch#191142) (details):
    • a scalar bound gives 0 at equality, and ties split 0.5/0.5;
    • with older PyTorch, BoTorch's gradients differ from botorch-rust's only at exact bounds.
  • MultiTaskGP and LCEMGP raise UnsupportedError for outcome transforms other than a plain Standardize. Before, they silently treated them as one.
  • Normalize.indices is a list.

Equivalence with BoTorch

The suite has 396 Rust tests and about 3,500 Python tests. It runs against BoTorch main and the latest release, under PyTorch 2.13 and 2.14.1.

Fits are compared in two stages:

  1. deterministic checks on 16 twins (training inputs perturbed at rounding level);
  2. if those fail, a statistical comparison with BoTorch's outcomes on 64 twins. It fails by chance with probability at most 0.2%.

The comparisons turned up bugs in BoTorch, GPyTorch and linear_operator, reported upstream:

Each docs page above lists the bugs it found.

Speed

Unchanged from 0.1.0; see the benchmarks.

botorch-rust v0.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 16:50

First release of botorch-rust: a Rust implementation of BoTorch with the same Python API (import botorch_rs instead of import botorch), tested for equivalence against BoTorch.

Install

pip install botorch-rust

Prebuilt abi3 wheels for CPython 3.11 and later (Windows x86_64, macOS arm64 and x86_64, Linux x86_64 and aarch64; no Rust toolchain needed), on PyPI and attached below. NumPy and PyTorch are optional: results come back in the array type you pass in.

What is in it

222 of BoTorch's 773 public classes and functions (coverage report):

  • Models: SingleTaskGP (multi-output, batched, fixed or inferred noise), ModelListGP, the contextual LCEMGP, PosteriorMeanModel and GenericDeterministicModel, Normalize / Standardize / InputPerturbation, conditioning and fantasies; fitting with BoTorch's L-BFGS-B setup.
  • Single-objective acquisition: analytic and Monte Carlo EI / LogEI / PI / UCB / NEI families, outcome constraints and MC objectives, optimize_acqf with linear and nonlinear constraints (SLSQP), fixed features and sequential batches.
  • Multi-objective optimization: all of botorch.acquisition.multi_objective: qLogNEHVI, qLogEHVI, qNEHVI, qEHVI, analytic EHVI, qLogNParEGO, the hypervolume knowledge gradient (also multi-fidelity), MOMF, max-value, joint and predictive entropy search, the multi-output risk measures and NSGA-II; box decompositions, hypervolumes, Pareto utilities and all 33 multi-objective test problems.
  • Pathwise sampling (draw_matheron_paths, MatheronPathModel) and torch callables as objectives, constraints, initializers and acquisition functions.

See What is not ported yet for the gaps.

Speed

Through the Python API on one CPU thread each (Intel Core Ultra 7 155H): a 30-iteration BO loop on Hartmann-6 is 47x faster than BoTorch, LogEI / qLogEI optimization 33-90x, qLogNEI and the multi-objective acquisition functions 9-14x, and model fitting from 1.4x (300 points, dominated by the Cholesky factorization) to 170x (20 points). With all cores, the multi-objective tasks reach 29-84x. See the benchmarks.

Equivalence with BoTorch

Every ported component is compared with BoTorch: Rust fixture tests generated with BoTorch, live side-by-side tests of both Python APIs against BoTorch main and the latest release, and a randomized equivalence sweep. Deterministic quantities (posteriors, likelihoods, gradients, hypervolumes) agree to 1e-9 or better; stochastic and optimization results are compared against BoTorch's own spread under rounding-level perturbations. The README lists the tolerances and worst errors per component. The comparison also turned up bugs in BoTorch itself, reported upstream.