Skip to main content

botorch-rust (Python package botorch_rs)

A fast Rust implementation of BoTorch with essentially the same Python API. Typical BoTorch code runs after changing the imports:

import torch
from botorch_rs.models import SingleTaskGP
from botorch_rs.models.transforms import Normalize, Standardize
from botorch_rs.mlls import ExactMarginalLogLikelihood
from botorch_rs.fit import fit_gpytorch_mll
from botorch_rs.acquisition import LogExpectedImprovement
from botorch_rs.optim import optimize_acqf

train_X = torch.rand(20, 6, dtype=torch.float64)
train_Y = (train_X - 0.5).pow(2).sum(-1, keepdim=True).neg()
model = SingleTaskGP(train_X, train_Y, input_transform=Normalize(d=6),
                     outcome_transform=Standardize(m=1))
fit_gpytorch_mll(ExactMarginalLogLikelihood(model.likelihood, model))
acqf = LogExpectedImprovement(model, best_f=train_Y.max())
bounds = torch.stack([torch.zeros(6), torch.ones(6)]).double()
candidate, value = optimize_acqf(acqf, bounds=bounds, q=1, num_restarts=10, raw_samples=512)

The package has no runtime dependencies: arrays may be torch tensors, NumPy arrays or nested lists of floats, and results have the type of the corresponding input. See the repository's README for the supported API, accuracy, benchmarks and known differences from BoTorch.

Native computation uses CPU float64. Torch/NumPy results preserve the input dtype and device, with transfers when needed. The audited official BoTorch core API inventory contains 776 public classes/functions, all available under matching paths; this measures API availability, not every configuration or Torch behavior. Supported models also accept backend="torch" for computation on the actual Tensor device, float32/float64, and full PyTorch autograd graphs through data and model Parameters. CUDA training data select that backend automatically. Device implementations include specialized and empirical models, scalar/multiobjective entropy search, lookahead, mixed/discrete search and scalar/multitask NUTS. Configuration limits, independent CPU/CUDA checks and measured performance are documented in the repository's Torch backend scope. See the repository's coverage and configuration limits and correctness findings. Performance depends on the workload and should be checked on representative data with release builds.

Installation

From a source checkout (requires a Rust toolchain):

$ pip install ./botorch_pyo3

License

MIT License

Metadata

Release files for botorch-rust 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for botorch-rust 0.4.0
File Size Uploaded Provenance Actions
botorch_rust-0.4.0.tar.gz 12.0 MB With provenance Details for botorch_rust-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for botorch-rust 0.4.0
File Actions
botorch_rust-0.4.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for botorch_rust-0.4.0-cp311-abi3-win_amd64.whl
botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
botorch_rust-0.4.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for botorch_rust-0.4.0-cp311-abi3-macosx_11_0_arm64.whl
botorch_rust-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for botorch_rust-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 49.1 MB

Release files / botorch_rust-0.4.0.tar.gz

Download URL botorch_rust-0.4.0.tar.gz
Size 12.0 MB
Tags Source
SHA-256 checksum
How to use checksums
a8553b400dc6b239bed81fad9d175adb0bde83da806443c31c473233a51de3f4
BLAKE2b-256 checksum
How to use checksums
57a9cd3e8ed7e59cab12228da105b911894d75fd625dbf42cdbdc660c02c9147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / botorch_rust-0.4.0-cp311-abi3-win_amd64.whl

Download URL botorch_rust-0.4.0-cp311-abi3-win_amd64.whl
Size 7.9 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5cf14da8be25d0eb19f07e3509a037f1829519045ef48e3b21b1c887bd23c632
BLAKE2b-256 checksum
How to use checksums
b6bd8ae5d0cc9c2b57ecd0ba5d3499f01e335db14e5c05a4a7067a2b290b067b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.7 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b9adbe8761bb4d41c2105147d004f95e99f95ac6dcfefdba4167db9559dacac2
BLAKE2b-256 checksum
How to use checksums
5d23faf609003c183ab054040f29f37ea8ec4b9c421c368571150afdae266f38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL botorch_rust-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.1 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
d15088a68b8da3dd2dc59bce53f5455c76fe2c2803d84fde284790ce9e7c4695
BLAKE2b-256 checksum
How to use checksums
c93e6fea5611300fcb2da9d035437532066585d2996afb1525846bac4216c3ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / botorch_rust-0.4.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL botorch_rust-0.4.0-cp311-abi3-macosx_11_0_arm64.whl
Size 7.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0df3e6e32528130308f3c27f8943d403dd05771df5127376aa6261e4a969f5c0
BLAKE2b-256 checksum
How to use checksums
fe41c5a22874293c8cfc316c5b26badafc6e1f3f8bc429a7731b3e22baf8a237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / botorch_rust-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL botorch_rust-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 7.5 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
439335fb73d21416084b5d2e76e543fcb17ad81964dd099c4d7b38ae3dd34c9a
BLAKE2b-256 checksum
How to use checksums
38981902df5290d9352b287ca37b2900847ca829376ddb1eef8756d2ad9fd491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for botorch-rust 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for botorch_rust-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page