poli 🧪, a library for discrete objective functions
poli is a library of discrete objective functions for benchmarking optimization algorithms.
Black boxes
Features
- 🔲 isolation of black box function calls inside conda environments. Don't worry about clashes w. black box requirements, poli will create the relevant conda environments for you.
- 🗒️ logging each black box call using observers.
- A numpy interface. Inputs are
np.arrays of strings, outputs arenp.arrays of floats. SMILESandSELFIESsupport for small molecule manipulation.
Getting started
To install poli, we recommend creating a fresh conda environment
conda create -n poli-base python=3.9
conda activate poli-base
pip install git+https://github.com/MachineLearningLifeScience/poli.git@dev
To check if everything went well, you can run
$ python -c "from poli import create"
An example: dockstring
In this next example, we estimate the docking score of the example provided in dockstring:
import numpy as np
from poli import objective_factory
problem = objective_factory.create(
name="dockstring",
target_name="drd2"
)
f, x0 = problem.black_box, problem.x0
y0 = f(x0)
# x0: [['C' 'C' '1' '=' 'C' '(' 'C', ...]] (i.e. Risperidone's SMILES)
# y0: 11.9
print(x0, y0)
Cite us and other relevant work
If you use certain black boxes, we expect you to cite the relevant work. Check inside the documentation of each black box for the relevant references.
Where can I find the documentation?
The main documentation site is hosted as a GitHub page here: https://machinelearninglifescience.github.io/poli-docs/
Building the documentation locally
If you install the requirements-dev.txt via
pip install -r requirements-dev.txt
then you will have access to sphinx. You should be able to build the documentation by going to the docs folder and building it:
cd docs/
make html
Afterwards, you can enter the build folder and open index.html.
Release files for poli-base 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| poli-base-1.0.1.tar.gz | 4.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| poli_base-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 MB
Release files / poli-base-1.0.1.tar.gz
| Download URL | poli-base-1.0.1.tar.gz |
|---|---|
| Size | 4.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbd8dcd79a1b528a6026a1da3dca01569ec45439d93a596da88ce8570e795f2a
|
|
BLAKE2b-256 checksum How to use checksums |
9d1da6c1c322f2cbeac2f3e970e8924c6ac2d4b20048944381f04ef443787232
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Release files / poli_base-1.0.1-py3-none-any.whl
| Download URL | poli_base-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d87d531118c4b2d3eea7874e0f27a0707338dae46840004de61b3057fddb590
|
|
BLAKE2b-256 checksum How to use checksums |
8b22c2317d755c780a24c8300e174d7ef5e17a4b8b2717c2951ff74242414416
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|