Skip to main content

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.

Release files for poli-core 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poli-core 1.3.1
File Size Uploaded
poli-core-1.3.1.tar.gz 4.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for poli-core 1.3.1
File Interpreter ABI Platform
poli_core-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 MB

Release files / poli-core-1.3.1.tar.gz

Download URL poli-core-1.3.1.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
754371b5f824f4db7996e4c0d7b72ef1e6340eeef365b1409dc1deb751b197c4
BLAKE2b-256 checksum
How to use checksums
57189fa1c579722e52f6b1fc60db927b5dbf307c40f2b43bbe654b4e16dc5681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / poli_core-1.3.1-py3-none-any.whl

Download URL poli_core-1.3.1-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b8d19bf1a221f9d489feb8991342784bf24aa482c4c0fdba1ad111b01a16973f
BLAKE2b-256 checksum
How to use checksums
024c24f5598bf3620ae0dfad4107b2bbe9f179e5e510f530fd5f80d594e79bf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page