Client for the Polaris Hub.
Project description
Polaris
So many stars in the sky, yet one is enough to guide you home.
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.
[!WARNING] The Polaris Hub is currently released as a closed, private beta. We hope to officially release it early 2024.
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.
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.
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 polaris_lib-0.5.0.tar.gz
.
File metadata
- Download URL: polaris_lib-0.5.0.tar.gz
- Upload date:
- Size: 421.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bbf5059caa80b1c8ae50ff1cb96670f96d00e09daa9801c02c1ab3203b85ed1 |
|
MD5 | c0e78364a0286a9e7d554ae45d99a67a |
|
BLAKE2b-256 | 45d30004857f4679ca4211ffcb14638091be611d59d511f7159f92338adc767c |
File details
Details for the file polaris_lib-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: polaris_lib-0.5.0-py3-none-any.whl
- Upload date:
- Size: 74.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0c6e4eb927502cec7992528aa3aef70ab4eabb496478cc07ecb5562d498d695 |
|
MD5 | d4b6ce07feb38dac7b3655014877fc8a |
|
BLAKE2b-256 | 2c453deb89d6b2b808b6a7419fddc6e45398c73549e24f6ffb27bbe918367d70 |