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.

Installation

From a source checkout (requires a Rust toolchain):

$ pip install ./botorch_pyo3

License

MIT License

Metadata

Release files for botorch-rust 0.2.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.2.0
File Size Uploaded Provenance
botorch_rust-0.2.0.tar.gz 9.4 MB With provenance Details

Built distributions (wheels)

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

Total release size: 32.3 MB

Release files / botorch_rust-0.2.0.tar.gz

Download URL botorch_rust-0.2.0.tar.gz
Size 9.4 MB
Tags Source
SHA-256 checksum
How to use checksums
cdcc7b8b2c8da9e3de6e0433416f3abe48ff8a405317b1380541a2996e3dd687
BLAKE2b-256 checksum
How to use checksums
280ea043c8402caf1b239db937c410878dd09d2678bbdfc4ba44174e7a89fae5
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 Oct 17, 2026.

Transparency log

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

Download URL botorch_rust-0.2.0-cp311-abi3-win_amd64.whl
Size 4.7 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
74bbf738d5a50d289807a9eba731c72d9d2d58e090b266ddda64fc7fa9d04152
BLAKE2b-256 checksum
How to use checksums
0422ebf735f674461391558a6d450f54a931428b543591becba999750a5fc90e
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 Oct 17, 2026.

Transparency log

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

Download URL botorch_rust-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.7 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
edf67a7003eec988a3fb90f76a5ae456c30eaacf14635a90da124286252f2fbe
BLAKE2b-256 checksum
How to use checksums
0fe7b746f39dc0cda937d5d2a54ca45036ea5c2714856514650609af50c01a50
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 Oct 17, 2026.

Transparency log

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

Download URL botorch_rust-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.4 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
a356ff0f84c1350f2b4ef58640d0e5670e975d914a039be3882b4462e80e15bc
BLAKE2b-256 checksum
How to use checksums
8a01f7d8a033236973315dfc5d569267fb305fd5cc2ee812b71ecad580951782
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 Oct 17, 2026.

Transparency log

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

Download URL botorch_rust-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Size 4.3 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9e423b62ac0daac06d6e80bee4c90fff8d4cef19dddcd8b60d60148d0161560a
BLAKE2b-256 checksum
How to use checksums
a09eb11f253c334b206896c216efc899468ce1efa6f779ecebd3be691528a34f
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 Oct 17, 2026.

Transparency log

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

Download URL botorch_rust-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 4.6 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
87289e856c5eecb58c14c385b202116792df56eb94aad2f2801470c16ea57fce
BLAKE2b-256 checksum
How to use checksums
dfd2d7abe5910d859811c8e8041717ffcfe18e42105a8db5de90e1572eca0325
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 Oct 17, 2026.

Transparency log

Security for botorch-rust 0.2.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.2.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 Oct 17, 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