Skip to main content

poli, a library of discrete objective functions

Project description

poli 🧪, a library for discrete objective functions

poli base (dev, conda, python 3.9) Link to documentation

poli is a library of discrete objective functions for benchmarking optimization algorithms.

Black boxes

Black box References Tests
Toy continuous functions (e.g. Ackley, Hartmann...) (Al-Roomi 2015), (Surjanovic & Bingham 2013) poli base (dev, conda, python 3.9)
Ehrlich functions (Stanton et al. 2024) poli base (dev, conda, python 3.9)
PMO/GuacaMol benchmark (Brown et al. 2019), (Gao et al. 2022), (Huang et al. 2021) poli tdc (dev, conda, python 3.9)
Dockstring (García-Ortegón et al. 2022) poli dockstring (dev, conda, python 3.9)
Rosetta Energy (Chaudhury et al. 2010) poli rosetta (conda, py3.9)
RaSP (Blaabjerg et al. 2023) poli rasp (conda, py3.9)
FoldX stability and SASA (Schymkowitz et al. 2005) -

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 are np.arrays of floats.
  • SMILES and SELFIES 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

Open the minimal example in Colab

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poli-core-1.1.1.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

poli_core-1.1.1-py3-none-any.whl (4.8 MB view details)

Uploaded Python 3

File details

Details for the file poli-core-1.1.1.tar.gz.

File metadata

  • Download URL: poli-core-1.1.1.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for poli-core-1.1.1.tar.gz
Algorithm Hash digest
SHA256 49ea4a08cdc8ffe8495855d1f8c487a7eabcbf35c76c588434f4c8e341d53ae6
MD5 9df8e4e2dcc3b63532be21713b845d94
BLAKE2b-256 6c57eca3399106704ec51c71605e1a626559dabaa16ae4e34417fbdeb1bf05f1

See more details on using hashes here.

File details

Details for the file poli_core-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: poli_core-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for poli_core-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af0a0be484d107b633c58bc096a9dd6d90eb07094c96d183af5bf3046f9cfee0
MD5 c50164b078673d114608bfd8f0a1f73a
BLAKE2b-256 35db8111a772cfe2cc9765f50ac02a1392634ae39337aee7f9ed0a55b22c11ed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page