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.1

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.1
File Size Uploaded Provenance Actions
botorch_rust-0.4.1.tar.gz 12.5 MB With provenance Details for botorch_rust-0.4.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for botorch-rust 0.4.1
File Actions
botorch_rust-0.4.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for botorch_rust-0.4.1-cp311-abi3-win_amd64.whl
botorch_rust-0.4.1-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.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
botorch_rust-0.4.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for botorch_rust-0.4.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
botorch_rust-0.4.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for botorch_rust-0.4.1-cp311-abi3-macosx_11_0_arm64.whl
botorch_rust-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for botorch_rust-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 52.5 MB

Release files / botorch_rust-0.4.1.tar.gz

Download URL botorch_rust-0.4.1.tar.gz
Size 12.5 MB
Tags Source
SHA-256 checksum
How to use checksums
81b34a2dfeffeb4399e63f876d1d7ed3802dbd03dd60ac8e3f5e1cf2e616940c
BLAKE2b-256 checksum
How to use checksums
1f661ffc9e75aca6d3e32e0469b087fb71b3448ea7f00d2ef78a6ac2f0651eb0
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.1-cp311-abi3-win_amd64.whl

Download URL botorch_rust-0.4.1-cp311-abi3-win_amd64.whl
Size 8.4 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fe082dbd7eadd5b774e8e2dbdb84248f8e914d5f42842ce7a0f30d72335a516b
BLAKE2b-256 checksum
How to use checksums
ea672f3708bd4cfc602ba569b373039c1a5fdeab1674a15216ba5e1e97ed0c1b
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.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL botorch_rust-0.4.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 8.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
875e3d98dcc06b77283b14d21850ef021a226171f86244e2fbdb28e7b88554dc
BLAKE2b-256 checksum
How to use checksums
46bc5b758a749f04754a4a77c737b039859963fee8eec6816f7dff71f70b0416
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.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL botorch_rust-0.4.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.7 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
691bdb1cce7d287b473933518927696316797779c0832262af904b9301472461
BLAKE2b-256 checksum
How to use checksums
9a4749c853ff27b2b74ee5134bdf0e26ea3061a9d19a3ac11408b0aaab70fd20
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.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL botorch_rust-0.4.1-cp311-abi3-macosx_11_0_arm64.whl
Size 7.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
87ce8c0c1e63e5c96d456e717b35d0d5a53ddf3b34a6d816b95b93f5baa73cd0
BLAKE2b-256 checksum
How to use checksums
4097064169784648dcc9c6632ff9aaa5649f2f595a34fc3d92a7eba37ba6778d
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.1-cp311-abi3-macosx_10_12_x86_64.whl

Download URL botorch_rust-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl
Size 8.1 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bbc9b0c670ac46844b0da97c3665fd85211423a21f2d6cfac7f2491f2ab83a4a
BLAKE2b-256 checksum
How to use checksums
c6aa56efba90e6e9e198cb2dc76849a072494c68578682f704fd1c327ec10e39
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.1

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.1.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