Skip to main content

Client for the Polaris Hub.

Project description


✨ Polaris Hub | 📚 Client Doc


Latest Release PyPI
Conda
Python Version PyPI - Python Version
License Code license
Downloads PyPI - Downloads
Conda
Citation DOI

Polaris establishes a novel, industry‑certified standard to foster the development of impactful methods in AI-based drug discovery.

This library is a Python client to interact with the Polaris Hub. It allows you to:

  • Download Polaris datasets and benchmarks.
  • Evaluate a custom method against a Polaris benchmark.
  • Create and upload new datasets and benchmarks.

Quick API Tour

import polaris as po

# Load the benchmark from the Hub
benchmark = po.load_benchmark("polaris/hello-world-benchmark")

# Get the train and test data-loaders
train, test = benchmark.get_train_test_split()

# Use the training data to train your model
# Get the input as an array with 'train.inputs' and 'train.targets'  
# Or simply iterate over the train object.
for x, y in train:
    ...

# Work your magic to accurately predict the test set
predictions = [0.0 for x in test]

# Evaluate your predictions
results = benchmark.evaluate(predictions)

# Submit your results
results.upload_to_hub(owner="dummy-user")

Documentation

Please refer to the documentation, which contains tutorials for getting started with polaris and detailed descriptions of the functions provided.

How to cite

Please cite Polaris if you use it in your research: DOI

Installation

You can install polaris using conda/mamba/micromamba:

conda install -c conda-forge polaris

You can also use pip:

pip install polaris-lib

Development lifecycle

Setup dev environment

conda env create -n polaris -f env.yml
conda activate polaris

pip install --no-deps -e .
Other installation options
Alternatively, using [uv](https://github.com/astral-sh/uv):
```shell
uv venv -p 3.12 polaris
source .venv/polaris/bin/activate
uv pip compile pyproject.toml -o requirements.txt --all-extras
uv pip install -r requirements.txt 
```   

Tests

You can run tests locally with:

pytest

License

Under the Apache-2.0 license. See LICENSE.

Download files

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

Source Distribution

polaris_lib-0.8.6.tar.gz (163.9 kB view details)

Uploaded Source

Built Distribution

polaris_lib-0.8.6-py3-none-any.whl (93.5 kB view details)

Uploaded Python 3

File details

Details for the file polaris_lib-0.8.6.tar.gz.

File metadata

  • Download URL: polaris_lib-0.8.6.tar.gz
  • Upload date:
  • Size: 163.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for polaris_lib-0.8.6.tar.gz
Algorithm Hash digest
SHA256 50c5c9d1d4984214c428643d06683fed88f59866f32c5ffb70f3990a6d22e567
MD5 08741c68435a0e00fd0c4b468de68c3f
BLAKE2b-256 7bb7df361265683ba50708d4657728e2fdd86e170cbc03c3daea2a97d6474cba

See more details on using hashes here.

File details

Details for the file polaris_lib-0.8.6-py3-none-any.whl.

File metadata

  • Download URL: polaris_lib-0.8.6-py3-none-any.whl
  • Upload date:
  • Size: 93.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for polaris_lib-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 57e846a374eb38bd620c61b7b2607a1d6deeadadc08a5e87d1da42bc5a0c3536
MD5 23c07339eacc663161661f2bd0f27619
BLAKE2b-256 cae65f122483855741fc55976b9a0ba2cc4cbac8a8b4c06220944e610cc65adf

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