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.3.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.3.0
File Size Uploaded Provenance
botorch_rust-0.3.0.tar.gz 12.0 MB With provenance Details

Built distributions (wheels)

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

Total release size: 48.8 MB

Release files / botorch_rust-0.3.0.tar.gz

Download URL botorch_rust-0.3.0.tar.gz
Size 12.0 MB
Tags Source
SHA-256 checksum
How to use checksums
de2f38dba2bce3f0a2215877738684da6a002d62ac3b14741b15822f0d14dab5
BLAKE2b-256 checksum
How to use checksums
689cd1013d33d3f7aa9ddd4d7be033a385a0745b214d8d400772eb2797dbe6a6
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 21, 2026.

Transparency log

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

Download URL botorch_rust-0.3.0-cp311-abi3-win_amd64.whl
Size 7.8 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
013a3681ff868b6558c3494badbbd99b917be183001e5e0d589374488d9bebcf
BLAKE2b-256 checksum
How to use checksums
82a51ff8d26acad54f03c38bf877004fd6d7aafdfe8e855dbf5f91246c82ec0a
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 21, 2026.

Transparency log

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

Download URL botorch_rust-0.3.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
7b9307926828a52f285bdd615326db0eb816c452553a0cbd6d3b0db2927ae2a4
BLAKE2b-256 checksum
How to use checksums
488a7a5d003f8c308010003da644082adee9721663548b9630be0dc1d072970d
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 21, 2026.

Transparency log

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

Download URL botorch_rust-0.3.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
8d85f83a033e9b81e39f8e132418ffa45bafdd59c791accb655ade156894d6e5
BLAKE2b-256 checksum
How to use checksums
73188c1b8c648f6e8814dc442104966600b9e339b699beaabcae3e94500da44f
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 21, 2026.

Transparency log

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

Download URL botorch_rust-0.3.0-cp311-abi3-macosx_11_0_arm64.whl
Size 6.9 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
21c820806e6dacd097c7425319117bf7c8588c1df8ba475a531471c4dbffb894
BLAKE2b-256 checksum
How to use checksums
e600905837bf24928a178b94a64bb7fb2a07fd713ebd2bdecbbd88f221c6ffb0
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 21, 2026.

Transparency log

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

Download URL botorch_rust-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 7.4 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6edc3f880fbdccf1f7771db8f37a7eb5a7840d9684ad66e2dc7706d49da21815
BLAKE2b-256 checksum
How to use checksums
8a5df7ae94d76fffc33282914bab06844daf4657678626feb3abe2ee6885a73a
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 21, 2026.

Transparency log

Security for botorch-rust 0.3.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.3.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 21, 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