baybe


Namebaybe JSON
Version 0.11.3 PyPI version JSON
download
home_pageNone
SummaryA Bayesian Back End for Design of Experiments
upload_time2024-11-06 14:27:24
maintainerNone
docs_urlNone
authorMerck KGaA, Darmstadt, Germany
requires_python<3.13,>=3.10
licenseApache-2.0
keywords active learning bayesian optmization design of experiments doe optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            <div align="center">
  <br/>

[![CI](https://img.shields.io/github/actions/workflow/status/emdgroup/baybe/ci.yml?style=flat-square&label=CI&labelColor=0f69af&color=ffdcb9)](https://github.com/emdgroup/baybe/actions/workflows/ci.yml)
[![Regular](https://img.shields.io/github/actions/workflow/status/emdgroup/baybe/regular.yml?style=flat-square&label=Regular%20Check&labelColor=0f69af&color=ffdcb9)](https://github.com/emdgroup/baybe/actions/workflows/regular.yml)
[![Docs](https://img.shields.io/github/actions/workflow/status/emdgroup/baybe/docs.yml?style=flat-square&label=Docs&labelColor=0f69af&color=ffdcb9)](https://github.com/emdgroup/baybe/actions/workflows/docs.yml)

[![Supports Python](https://img.shields.io/pypi/pyversions/baybe?style=flat-square&label=Supports%20Python&labelColor=96d7d2&color=ffdcb9)](https://pypi.org/project/baybe/)
[![PyPI version](https://img.shields.io/pypi/v/baybe.svg?style=flat-square&label=PyPI%20Version&labelColor=96d7d2&color=ffdcb9)](https://pypi.org/project/baybe/)
[![Issues](https://img.shields.io/github/issues/emdgroup/baybe?style=flat-square&label=Issues&labelColor=96d7d2&color=ffdcb9)](https://github.com/emdgroup/baybe/issues/)
[![PRs](https://img.shields.io/github/issues-pr/emdgroup/baybe?style=flat-square&label=PRs&labelColor=96d7d2&color=ffdcb9)](https://github.com/emdgroup/baybe/pulls/)
[![License](https://shields.io/badge/License-Apache%202.0-green.svg?style=flat-square&labelColor=96d7d2&color=ffdcb9)](http://www.apache.org/licenses/LICENSE-2.0)

[![Logo](https://raw.githubusercontent.com/emdgroup/baybe/main/docs/_static/banner2.svg)](https://github.com/emdgroup/baybe/)

&nbsp;
<a href="https://emdgroup.github.io/baybe/">Homepage<a/>
&nbsp;•&nbsp;
<a href="https://emdgroup.github.io/baybe/stable/userguide/userguide.html">User Guide<a/>
&nbsp;•&nbsp;
<a href="https://emdgroup.github.io/baybe/stable/_autosummary/baybe.html">Documentation<a/>
&nbsp;•&nbsp;
<a href="https://emdgroup.github.io/baybe/stable/misc/contributing_link.html">Contribute<a/>
&nbsp;
</div>

# BayBE — A Bayesian Back End for Design of Experiments

The **Bay**esian **B**ack **E**nd (**BayBE**) is a general-purpose toolbox for Bayesian Design
of Experiments, focusing on additions that enable real-world experimental campaigns.

Besides functionality to perform a typical recommend-measure loop, BayBE's highlights are:
- ✨ Custom parameter encodings: Improve your campaign with domain knowledge
- 🧪 Built-in chemical encodings: Improve your campaign with chemical knowledge
- 🎯 Single and multiple targets with min, max and match objectives
- 🎭 Hybrid (mixed continuous and discrete) spaces
- 🚀 Transfer learning: Mix data from multiple campaigns and accelerate optimization
- 🎰 Bandit models: Efficiently find the best among many options in noisy environments (e.g. A/B Testing)
- 🌎 Distributed workflows: Run campaigns asynchronously with pending experiments
- 🎓 Active learning: Perform smart data acquisition campaigns
- ⚙️ Custom surrogate models: Enhance your predictions through mechanistic understanding
- 📈 Comprehensive backtest, simulation and imputation utilities: Benchmark and find your best settings
- 📝 Fully typed and hypothesis-tested: Robust code base
- 🔄 All objects are fully de-/serializable: Useful for storing results in databases or use in wrappers like APIs


## ⚡ Quick Start

Let us consider a simple experiment where we control three parameters and want to
maximize a single target called `Yield`.

First, install BayBE into your Python environment: 
```bash 
pip install baybe 
``` 
For more information on this step, see our
[detailed installation instructions](#installation).

### Defining the Optimization Objective

In BayBE's language, the `Yield` can be represented as a `NumericalTarget`,
which we wrap into a `SingleTargetObjective`:

```python
from baybe.targets import NumericalTarget
from baybe.objectives import SingleTargetObjective

target = NumericalTarget(
    name="Yield",
    mode="MAX",
)
objective = SingleTargetObjective(target=target)
```
In cases where we are confronted with multiple (potentially conflicting) targets,
the `DesirabilityObjective` can be used instead. It allows to define additional
settings, such as how these targets should be balanced.
For more details, see the
[objectives section](https://emdgroup.github.io/baybe/stable/userguide/objectives.html)
of the user guide.

### Defining the Search Space

Next, we inform BayBE about the available "control knobs", that is, the underlying
system parameters we can tune to optimize our targets. This also involves specifying 
their values/ranges and other parameter-specific details.

For our example, we assume that we can control three parameters – `Granularity`,
`Pressure[bar]`, and `Solvent` – as follows:

```python
from baybe.parameters import (
    CategoricalParameter,
    NumericalDiscreteParameter,
    SubstanceParameter,
)

parameters = [
    CategoricalParameter(
        name="Granularity",
        values=["coarse", "medium", "fine"],
        encoding="OHE",  # one-hot encoding of categories
    ),
    NumericalDiscreteParameter(
        name="Pressure[bar]",
        values=[1, 5, 10],
        tolerance=0.2,  # allows experimental inaccuracies up to 0.2 when reading values
    ),
    SubstanceParameter(
        name="Solvent",
        data={
            "Solvent A": "COC",
            "Solvent B": "CCC",  # label-SMILES pairs
            "Solvent C": "O",
            "Solvent D": "CS(=O)C",
        },
        encoding="MORDRED",  # chemical encoding via mordred package
    ),
]
```

For more parameter types and their details, see the
[parameters section](https://emdgroup.github.io/baybe/stable/userguide/parameters.html)
of the user guide.

Additionally, we can define a set of constraints to further specify allowed ranges and
relationships between our parameters. Details can be found in the
[constraints section](https://emdgroup.github.io/baybe/stable/userguide/constraints.html) of the user guide.
In this example, we assume no further constraints.

With the parameter definitions at hand, we can now create our
`SearchSpace` based on the Cartesian product of all possible parameter values:

```python
from baybe.searchspace import SearchSpace

searchspace = SearchSpace.from_product(parameters)
```

See the [search spaces section](https://emdgroup.github.io/baybe/stable/userguide/searchspace.html)
of our user guide for more information on the structure of search spaces
and alternative ways of construction. 

### Optional: Defining the Optimization Strategy

As an optional step, we can specify details on how the optimization should be
conducted. If omitted, BayBE will choose a default setting.

For our example, we combine two recommenders via a so-called meta recommender named
`TwoPhaseMetaRecommender`:

1. In cases where no measurements have been made prior to the interaction with BayBE,
   a selection via `initial_recommender` is used.
2. As soon as the first measurements are available, we switch to `recommender`.

For more details on the different recommenders, their underlying algorithmic
details, and their configuration settings, see the
[recommenders section](https://emdgroup.github.io/baybe/stable/userguide/recommenders.html)
of the user guide.

```python
from baybe.recommenders import (
    BotorchRecommender,
    FPSRecommender,
    TwoPhaseMetaRecommender,
)

recommender = TwoPhaseMetaRecommender(
    initial_recommender=FPSRecommender(),  # farthest point sampling
    recommender=BotorchRecommender(),  # Bayesian model-based optimization
)
```

### The Optimization Loop

We can now construct a campaign object that brings all pieces of the puzzle together:

```python
from baybe import Campaign

campaign = Campaign(searchspace, objective, recommender)
```

With this object at hand, we can start our experimentation cycle.
In particular:

* We can ask BayBE to `recommend` new experiments.
* We can `add_measurements` for certain experimental settings to the campaign's 
  database.

Note that these two steps can be performed in any order.
In particular, available measurements can be submitted at any time and also several 
times before querying the next recommendations.

```python
df = campaign.recommend(batch_size=3)
print(df)
```

```none
   Granularity  Pressure[bar]    Solvent
15      medium            1.0  Solvent D
10      coarse           10.0  Solvent C
29        fine            5.0  Solvent B
```

Note that the specific recommendations will depend on both the data
already fed to the campaign and the random number generator seed that is used.

After having conducted the corresponding experiments, we can add our measured
targets to the table and feed it back to the campaign:

```python
df["Yield"] = [79.8, 54.1, 59.4]
campaign.add_measurements(df)
```

With the newly arrived data, BayBE can produce a refined design for the next iteration.
This loop would typically continue until a desired target value has been achieved in
the experiment.

### Advanced Example: Chemical Substances
BayBE has several modules to go beyond traditional approaches. One such example is the
use of custom encodings for categorical parameters. Chemical encodings for substances
are a special built-in case of this that comes with BayBE.

In the following picture you can see
the outcome for treating the solvent, base and ligand in a direct arylation reaction
optimization (from [Shields, B.J. et al.](https://doi.org/10.1038/s41586-021-03213-y)) with
chemical encodings compared to one-hot and a random baseline:
![Substance Encoding Example](./examples/Backtesting/full_lookup_light.svg)

(installation)=
## 💻 Installation
### From Package Index
The easiest way to install BayBE is via PyPI:

```bash
pip install baybe
```

A certain released version of the package can be installed by specifying the
corresponding version tag in the form `baybe==x.y.z`.

### From GitHub
If you need finer control and would like to install a specific commit that has not been
released under a certain version tag, you can do so by installing BayBE directly from
GitHub via git and specifying the corresponding
[git ref](https://pip.pypa.io/en/stable/topics/vcs-support/#git).

For instance, to install the latest commit of the main branch, run:

```bash
pip install git+https://github.com/emdgroup/baybe.git@main
```


### From Local Clone

Alternatively, you can install the package from your own local copy.
First, clone the repository, navigate to the repository root folder, check out the
desired commit, and run:

```bash
pip install .
```

A developer would typically also install the package in editable mode ('-e'),
which ensures that changes to the code do not require a reinstallation.

```bash
pip install -e .
```

If you need to add additional dependencies, make sure to use the correct syntax
including `''`:

```bash
pip install -e '.[dev]'
```

### Optional Dependencies
There are several dependency groups that can be selected during pip installation, like
```bash
pip install 'baybe[test,lint]' # will install baybe with additional dependency groups `test` and `lint`
```
To get the most out of `baybe`, we recommend to install at least
```bash
pip install 'baybe[chem,simulation]'
```

The available groups are:
- `chem`: Cheminformatics utilities (e.g. for the `SubstanceParameter`).
- `docs`: Required for creating the documentation.
- `examples`: Required for running the examples/streamlit.
- `lint`: Required for linting and formatting.
- `mypy`: Required for static type checking.
- `onnx`: Required for using custom surrogate models in [ONNX format](https://onnx.ai).
- `polars`: Required for optimized search space construction via [Polars](https://docs.pola.rs/)
- `simulation`: Enabling the [simulation](https://emdgroup.github.io/baybe/stable/_autosummary/baybe.simulation.html) module.
- `test`: Required for running the tests.
- `dev`: All of the above plus `tox` and `pip-audit`. For code contributors.

## 📡 Telemetry
BayBE collects anonymous usage statistics **only** for employees of Merck KGaA, 
Darmstadt, Germany and/or its affiliates. The recording of metrics is turned off for
all other users and is impossible due to a VPN block. In any case, the usage statistics
do **not** involve logging of recorded measurements, targets/parameters or their names
or any project information that would allow for reconstruction of details. The user and
host machine names are anonymized with via truncated hashing.
- You can verify the above statements by studying the open-source code in the
  `telemetry` module.
- You can always deactivate all telemetry by setting the environment variable 
  `BAYBE_TELEMETRY_ENABLED` to `false` or `off`. For details please consult
  [this page](https://emdgroup.github.io/baybe/stable/userguide/envvars.html#telemetry).
- If you want to be absolutely sure, you can uninstall internet related packages such
  as `opentelemetry*` or its secondary dependencies from the environment. Due to the
  inability of specifying opt-out dependencies, these are installed by default, but the
  package works without them.

## 👨🏻‍🔧 Maintainers

- Martin Fitzner (Merck KGaA, Darmstadt, Germany), [Contact](mailto:martin.fitzner@merckgroup.com), [Github](https://github.com/Scienfitz)
- Adrian Šošić (Merck Life Science KGaA, Darmstadt, Germany), [Contact](mailto:adrian.sosic@merckgroup.com), [Github](https://github.com/AdrianSosic)
- Alexander Hopp (Merck KGaA, Darmstadt, Germany) [Contact](mailto:alexander.hopp@merckgroup.com), [Github](https://github.com/AVHopp)


## 🛠️ Known Issues
A list of know issues can be found [here](https://emdgroup.github.io/baybe/stable/known_issues.html).


## 📄 License

Copyright 2022-2024 Merck KGaA, Darmstadt, Germany
and/or its affiliates. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "baybe",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "Active Learning, Bayesian Optmization, Design of Experiments, DOE, Optimization",
    "author": "Merck KGaA, Darmstadt, Germany",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ec/fe/e93ec2d6160f474faea369560c6c668ad1012891ee8218d89f04e4d7e126/baybe-0.11.3.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <br/>\n\n[![CI](https://img.shields.io/github/actions/workflow/status/emdgroup/baybe/ci.yml?style=flat-square&label=CI&labelColor=0f69af&color=ffdcb9)](https://github.com/emdgroup/baybe/actions/workflows/ci.yml)\n[![Regular](https://img.shields.io/github/actions/workflow/status/emdgroup/baybe/regular.yml?style=flat-square&label=Regular%20Check&labelColor=0f69af&color=ffdcb9)](https://github.com/emdgroup/baybe/actions/workflows/regular.yml)\n[![Docs](https://img.shields.io/github/actions/workflow/status/emdgroup/baybe/docs.yml?style=flat-square&label=Docs&labelColor=0f69af&color=ffdcb9)](https://github.com/emdgroup/baybe/actions/workflows/docs.yml)\n\n[![Supports Python](https://img.shields.io/pypi/pyversions/baybe?style=flat-square&label=Supports%20Python&labelColor=96d7d2&color=ffdcb9)](https://pypi.org/project/baybe/)\n[![PyPI version](https://img.shields.io/pypi/v/baybe.svg?style=flat-square&label=PyPI%20Version&labelColor=96d7d2&color=ffdcb9)](https://pypi.org/project/baybe/)\n[![Issues](https://img.shields.io/github/issues/emdgroup/baybe?style=flat-square&label=Issues&labelColor=96d7d2&color=ffdcb9)](https://github.com/emdgroup/baybe/issues/)\n[![PRs](https://img.shields.io/github/issues-pr/emdgroup/baybe?style=flat-square&label=PRs&labelColor=96d7d2&color=ffdcb9)](https://github.com/emdgroup/baybe/pulls/)\n[![License](https://shields.io/badge/License-Apache%202.0-green.svg?style=flat-square&labelColor=96d7d2&color=ffdcb9)](http://www.apache.org/licenses/LICENSE-2.0)\n\n[![Logo](https://raw.githubusercontent.com/emdgroup/baybe/main/docs/_static/banner2.svg)](https://github.com/emdgroup/baybe/)\n\n&nbsp;\n<a href=\"https://emdgroup.github.io/baybe/\">Homepage<a/>\n&nbsp;\u2022&nbsp;\n<a href=\"https://emdgroup.github.io/baybe/stable/userguide/userguide.html\">User Guide<a/>\n&nbsp;\u2022&nbsp;\n<a href=\"https://emdgroup.github.io/baybe/stable/_autosummary/baybe.html\">Documentation<a/>\n&nbsp;\u2022&nbsp;\n<a href=\"https://emdgroup.github.io/baybe/stable/misc/contributing_link.html\">Contribute<a/>\n&nbsp;\n</div>\n\n# BayBE \u2014 A Bayesian Back End for Design of Experiments\n\nThe **Bay**esian **B**ack **E**nd (**BayBE**) is a general-purpose toolbox for Bayesian Design\nof Experiments, focusing on additions that enable real-world experimental campaigns.\n\nBesides functionality to perform a typical recommend-measure loop, BayBE's highlights are:\n- \u2728 Custom parameter encodings: Improve your campaign with domain knowledge\n- \ud83e\uddea Built-in chemical encodings: Improve your campaign with chemical knowledge\n- \ud83c\udfaf Single and multiple targets with min, max and match objectives\n- \ud83c\udfad Hybrid (mixed continuous and discrete) spaces\n- \ud83d\ude80 Transfer learning: Mix data from multiple campaigns and accelerate optimization\n- \ud83c\udfb0 Bandit models: Efficiently find the best among many options in noisy environments (e.g. A/B Testing)\n- \ud83c\udf0e Distributed workflows: Run campaigns asynchronously with pending experiments\n- \ud83c\udf93 Active learning: Perform smart data acquisition campaigns\n- \u2699\ufe0f Custom surrogate models: Enhance your predictions through mechanistic understanding\n- \ud83d\udcc8 Comprehensive backtest, simulation and imputation utilities: Benchmark and find your best settings\n- \ud83d\udcdd Fully typed and hypothesis-tested: Robust code base\n- \ud83d\udd04 All objects are fully de-/serializable: Useful for storing results in databases or use in wrappers like APIs\n\n\n## \u26a1 Quick Start\n\nLet us consider a simple experiment where we control three parameters and want to\nmaximize a single target called `Yield`.\n\nFirst, install BayBE into your Python environment: \n```bash \npip install baybe \n``` \nFor more information on this step, see our\n[detailed installation instructions](#installation).\n\n### Defining the Optimization Objective\n\nIn BayBE's language, the `Yield` can be represented as a `NumericalTarget`,\nwhich we wrap into a `SingleTargetObjective`:\n\n```python\nfrom baybe.targets import NumericalTarget\nfrom baybe.objectives import SingleTargetObjective\n\ntarget = NumericalTarget(\n    name=\"Yield\",\n    mode=\"MAX\",\n)\nobjective = SingleTargetObjective(target=target)\n```\nIn cases where we are confronted with multiple (potentially conflicting) targets,\nthe `DesirabilityObjective` can be used instead. It allows to define additional\nsettings, such as how these targets should be balanced.\nFor more details, see the\n[objectives section](https://emdgroup.github.io/baybe/stable/userguide/objectives.html)\nof the user guide.\n\n### Defining the Search Space\n\nNext, we inform BayBE about the available \"control knobs\", that is, the underlying\nsystem parameters we can tune to optimize our targets. This also involves specifying \ntheir values/ranges and other parameter-specific details.\n\nFor our example, we assume that we can control three parameters \u2013 `Granularity`,\n`Pressure[bar]`, and `Solvent` \u2013 as follows:\n\n```python\nfrom baybe.parameters import (\n    CategoricalParameter,\n    NumericalDiscreteParameter,\n    SubstanceParameter,\n)\n\nparameters = [\n    CategoricalParameter(\n        name=\"Granularity\",\n        values=[\"coarse\", \"medium\", \"fine\"],\n        encoding=\"OHE\",  # one-hot encoding of categories\n    ),\n    NumericalDiscreteParameter(\n        name=\"Pressure[bar]\",\n        values=[1, 5, 10],\n        tolerance=0.2,  # allows experimental inaccuracies up to 0.2 when reading values\n    ),\n    SubstanceParameter(\n        name=\"Solvent\",\n        data={\n            \"Solvent A\": \"COC\",\n            \"Solvent B\": \"CCC\",  # label-SMILES pairs\n            \"Solvent C\": \"O\",\n            \"Solvent D\": \"CS(=O)C\",\n        },\n        encoding=\"MORDRED\",  # chemical encoding via mordred package\n    ),\n]\n```\n\nFor more parameter types and their details, see the\n[parameters section](https://emdgroup.github.io/baybe/stable/userguide/parameters.html)\nof the user guide.\n\nAdditionally, we can define a set of constraints to further specify allowed ranges and\nrelationships between our parameters. Details can be found in the\n[constraints section](https://emdgroup.github.io/baybe/stable/userguide/constraints.html) of the user guide.\nIn this example, we assume no further constraints.\n\nWith the parameter definitions at hand, we can now create our\n`SearchSpace` based on the Cartesian product of all possible parameter values:\n\n```python\nfrom baybe.searchspace import SearchSpace\n\nsearchspace = SearchSpace.from_product(parameters)\n```\n\nSee the [search spaces section](https://emdgroup.github.io/baybe/stable/userguide/searchspace.html)\nof our user guide for more information on the structure of search spaces\nand alternative ways of construction. \n\n### Optional: Defining the Optimization Strategy\n\nAs an optional step, we can specify details on how the optimization should be\nconducted. If omitted, BayBE will choose a default setting.\n\nFor our example, we combine two recommenders via a so-called meta recommender named\n`TwoPhaseMetaRecommender`:\n\n1. In cases where no measurements have been made prior to the interaction with BayBE,\n   a selection via `initial_recommender` is used.\n2. As soon as the first measurements are available, we switch to `recommender`.\n\nFor more details on the different recommenders, their underlying algorithmic\ndetails, and their configuration settings, see the\n[recommenders section](https://emdgroup.github.io/baybe/stable/userguide/recommenders.html)\nof the user guide.\n\n```python\nfrom baybe.recommenders import (\n    BotorchRecommender,\n    FPSRecommender,\n    TwoPhaseMetaRecommender,\n)\n\nrecommender = TwoPhaseMetaRecommender(\n    initial_recommender=FPSRecommender(),  # farthest point sampling\n    recommender=BotorchRecommender(),  # Bayesian model-based optimization\n)\n```\n\n### The Optimization Loop\n\nWe can now construct a campaign object that brings all pieces of the puzzle together:\n\n```python\nfrom baybe import Campaign\n\ncampaign = Campaign(searchspace, objective, recommender)\n```\n\nWith this object at hand, we can start our experimentation cycle.\nIn particular:\n\n* We can ask BayBE to `recommend` new experiments.\n* We can `add_measurements` for certain experimental settings to the campaign's \n  database.\n\nNote that these two steps can be performed in any order.\nIn particular, available measurements can be submitted at any time and also several \ntimes before querying the next recommendations.\n\n```python\ndf = campaign.recommend(batch_size=3)\nprint(df)\n```\n\n```none\n   Granularity  Pressure[bar]    Solvent\n15      medium            1.0  Solvent D\n10      coarse           10.0  Solvent C\n29        fine            5.0  Solvent B\n```\n\nNote that the specific recommendations will depend on both the data\nalready fed to the campaign and the random number generator seed that is used.\n\nAfter having conducted the corresponding experiments, we can add our measured\ntargets to the table and feed it back to the campaign:\n\n```python\ndf[\"Yield\"] = [79.8, 54.1, 59.4]\ncampaign.add_measurements(df)\n```\n\nWith the newly arrived data, BayBE can produce a refined design for the next iteration.\nThis loop would typically continue until a desired target value has been achieved in\nthe experiment.\n\n### Advanced Example: Chemical Substances\nBayBE has several modules to go beyond traditional approaches. One such example is the\nuse of custom encodings for categorical parameters. Chemical encodings for substances\nare a special built-in case of this that comes with BayBE.\n\nIn the following picture you can see\nthe outcome for treating the solvent, base and ligand in a direct arylation reaction\noptimization (from [Shields, B.J. et al.](https://doi.org/10.1038/s41586-021-03213-y)) with\nchemical encodings compared to one-hot and a random baseline:\n![Substance Encoding Example](./examples/Backtesting/full_lookup_light.svg)\n\n(installation)=\n## \ud83d\udcbb Installation\n### From Package Index\nThe easiest way to install BayBE is via PyPI:\n\n```bash\npip install baybe\n```\n\nA certain released version of the package can be installed by specifying the\ncorresponding version tag in the form `baybe==x.y.z`.\n\n### From GitHub\nIf you need finer control and would like to install a specific commit that has not been\nreleased under a certain version tag, you can do so by installing BayBE directly from\nGitHub via git and specifying the corresponding\n[git ref](https://pip.pypa.io/en/stable/topics/vcs-support/#git).\n\nFor instance, to install the latest commit of the main branch, run:\n\n```bash\npip install git+https://github.com/emdgroup/baybe.git@main\n```\n\n\n### From Local Clone\n\nAlternatively, you can install the package from your own local copy.\nFirst, clone the repository, navigate to the repository root folder, check out the\ndesired commit, and run:\n\n```bash\npip install .\n```\n\nA developer would typically also install the package in editable mode ('-e'),\nwhich ensures that changes to the code do not require a reinstallation.\n\n```bash\npip install -e .\n```\n\nIf you need to add additional dependencies, make sure to use the correct syntax\nincluding `''`:\n\n```bash\npip install -e '.[dev]'\n```\n\n### Optional Dependencies\nThere are several dependency groups that can be selected during pip installation, like\n```bash\npip install 'baybe[test,lint]' # will install baybe with additional dependency groups `test` and `lint`\n```\nTo get the most out of `baybe`, we recommend to install at least\n```bash\npip install 'baybe[chem,simulation]'\n```\n\nThe available groups are:\n- `chem`: Cheminformatics utilities (e.g. for the `SubstanceParameter`).\n- `docs`: Required for creating the documentation.\n- `examples`: Required for running the examples/streamlit.\n- `lint`: Required for linting and formatting.\n- `mypy`: Required for static type checking.\n- `onnx`: Required for using custom surrogate models in [ONNX format](https://onnx.ai).\n- `polars`: Required for optimized search space construction via [Polars](https://docs.pola.rs/)\n- `simulation`: Enabling the [simulation](https://emdgroup.github.io/baybe/stable/_autosummary/baybe.simulation.html) module.\n- `test`: Required for running the tests.\n- `dev`: All of the above plus `tox` and `pip-audit`. For code contributors.\n\n## \ud83d\udce1 Telemetry\nBayBE collects anonymous usage statistics **only** for employees of Merck KGaA, \nDarmstadt, Germany and/or its affiliates. The recording of metrics is turned off for\nall other users and is impossible due to a VPN block. In any case, the usage statistics\ndo **not** involve logging of recorded measurements, targets/parameters or their names\nor any project information that would allow for reconstruction of details. The user and\nhost machine names are anonymized with via truncated hashing.\n- You can verify the above statements by studying the open-source code in the\n  `telemetry` module.\n- You can always deactivate all telemetry by setting the environment variable \n  `BAYBE_TELEMETRY_ENABLED` to `false` or `off`. For details please consult\n  [this page](https://emdgroup.github.io/baybe/stable/userguide/envvars.html#telemetry).\n- If you want to be absolutely sure, you can uninstall internet related packages such\n  as `opentelemetry*` or its secondary dependencies from the environment. Due to the\n  inability of specifying opt-out dependencies, these are installed by default, but the\n  package works without them.\n\n## \ud83d\udc68\ud83c\udffb\u200d\ud83d\udd27 Maintainers\n\n- Martin Fitzner (Merck KGaA, Darmstadt, Germany), [Contact](mailto:martin.fitzner@merckgroup.com), [Github](https://github.com/Scienfitz)\n- Adrian \u0160o\u0161i\u0107 (Merck Life Science KGaA, Darmstadt, Germany), [Contact](mailto:adrian.sosic@merckgroup.com), [Github](https://github.com/AdrianSosic)\n- Alexander Hopp (Merck KGaA, Darmstadt, Germany) [Contact](mailto:alexander.hopp@merckgroup.com), [Github](https://github.com/AVHopp)\n\n\n## \ud83d\udee0\ufe0f Known Issues\nA list of know issues can be found [here](https://emdgroup.github.io/baybe/stable/known_issues.html).\n\n\n## \ud83d\udcc4 License\n\nCopyright 2022-2024 Merck KGaA, Darmstadt, Germany\nand/or its affiliates. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A Bayesian Back End for Design of Experiments",
    "version": "0.11.3",
    "project_urls": {
        "Changelog": "https://emdgroup.github.io/baybe/misc/changelog_link.html",
        "Documentation": "https://emdgroup.github.io/baybe/_autosummary/baybe.html",
        "GitHub": "https://github.com/emdgroup/baybe/",
        "Homepage": "https://emdgroup.github.io/baybe/",
        "Issues": "https://github.com/emdgroup/baybe/issues/"
    },
    "split_keywords": [
        "active learning",
        " bayesian optmization",
        " design of experiments",
        " doe",
        " optimization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7ce81e622871d480a2d20d6905b1a6b9f431789320cba213e4478e593c165a0",
                "md5": "9cb7717a00c40aba1781163cd4226b3d",
                "sha256": "f1c8fc74dcda1a054e3fe38998c9c6a66e527cc5b56db9854b70cc2718ed96ab"
            },
            "downloads": -1,
            "filename": "baybe-0.11.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9cb7717a00c40aba1781163cd4226b3d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 194520,
            "upload_time": "2024-11-06T14:27:21",
            "upload_time_iso_8601": "2024-11-06T14:27:21.585568Z",
            "url": "https://files.pythonhosted.org/packages/f7/ce/81e622871d480a2d20d6905b1a6b9f431789320cba213e4478e593c165a0/baybe-0.11.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ecfee93ec2d6160f474faea369560c6c668ad1012891ee8218d89f04e4d7e126",
                "md5": "203ac622efc81fa645dbe2af12ac3295",
                "sha256": "0a75bc28412797f37260c918289ed2a36733c9dde1672ea1878c46fb3960213c"
            },
            "downloads": -1,
            "filename": "baybe-0.11.3.tar.gz",
            "has_sig": false,
            "md5_digest": "203ac622efc81fa645dbe2af12ac3295",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 739981,
            "upload_time": "2024-11-06T14:27:24",
            "upload_time_iso_8601": "2024-11-06T14:27:24.303966Z",
            "url": "https://files.pythonhosted.org/packages/ec/fe/e93ec2d6160f474faea369560c6c668ad1012891ee8218d89f04e4d7e126/baybe-0.11.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-06 14:27:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "emdgroup",
    "github_project": "baybe",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "baybe"
}
        
Elapsed time: 4.41883s