poli, a library of discrete objective functions
Project description
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.array
s of strings, outputs arenp.array
s of floats. SMILES
andSELFIES
support 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
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file poli-core-1.0.1.tar.gz
.
File metadata
- Download URL: poli-core-1.0.1.tar.gz
- Upload date:
- Size: 4.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc1b771ef0903c84ee0e9e50989b521632241ebe6aa235a416320c094bad4c34 |
|
MD5 | 1980d0ad13a1b877b03a3e8e3901a1bc |
|
BLAKE2b-256 | 3057a2a425479bd01f4e46683cc8e46366dc7bf6f73569e764169ca91f4f6ceb |
File details
Details for the file poli_core-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: poli_core-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 859dfdb6048198af7dd33c4a560af6fe0fe6c0f9f5e0e772c22ce323851a22ca |
|
MD5 | 2cc145cdfc52e3be6ad7692e2b1b9bf3 |
|
BLAKE2b-256 | 868cd21c91c2e4f77e7df192f5d926e58e65cc1317503e1245ab31c579928969 |