Metadata-Version: 2.4
Name: botorch-rust
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Dist: pytest>=8 ; extra == 'parity'
Requires-Dist: botorch ; extra == 'parity'
Requires-Dist: numpy ; extra == 'parity'
Requires-Dist: pytest>=8 ; extra == 'test'
Provides-Extra: parity
Provides-Extra: test
Summary: A fast Rust implementation of BoTorch with the same Python API
Keywords: bayesian-optimization,gaussian-process,botorch,rust
Author: The botorch-rust authors
License-Expression: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: botorch, https://botorch.org
Project-URL: repository, https://github.com/M-Colley/botorch-rust

# botorch-rust (Python package `botorch_rs`)

A fast Rust implementation of [BoTorch](https://botorch.org) with essentially
the same Python API. Typical BoTorch code runs after changing the imports:

```python
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):

```console
$ pip install ./botorch_pyo3
```

## License

MIT License

