-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Sets up an environment.yml and prepares for testing * Adds tests for the PMO benchmark * Moves tox testing to the relevant folder * adds PR to the event triggers * Moves the action to the relevant folder * Wrong version of black was running. Lints * Removes conda dependency in tox * Cleans up tox to only run a single env * Removes old dependencies to molopt's VAE * Removes old dependencies to molopt in experiment run
- Loading branch information
1 parent
8c6a4ab
commit 06ea1d0
Showing
14 changed files
with
120 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Tests on hdbo (conda, python 3.10) | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install tox | ||
- name: Check linting and tests with tox | ||
run: | | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: hdbo_benchmark | ||
channels: | ||
- defaults | ||
dependencies: | ||
- python=3.10 | ||
- pip | ||
- pip: | ||
- botorch | ||
- seaborn | ||
- CairoSVG | ||
- wandb | ||
- click | ||
- "git+https://github.com/MachineLearningLifeScience/poli.git@dev" | ||
- "git+https://github.com/MachineLearningLifeScience/poli-baselines.git@main" | ||
- -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/hdbo_benchmark/data_preprocessing/zinc250k/02_save_as_csv.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Loads the processed datasets, and saves them as a csv.""" | ||
|
||
import pickle | ||
from pathlib import Path | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from click.testing import CliRunner | ||
from hdbo_benchmark.experiments.benchmark_on_pmo.run import main | ||
|
||
|
||
@pytest.mark.parametrize("function_name", ["albuterol_similarity", "valsartan_smarts"]) | ||
@pytest.mark.parametrize("solver_name", ["random_mutation", "line_bo", "turbo"]) | ||
@pytest.mark.parametrize("latent_dim", [2, 128]) | ||
def test_main_run(function_name, solver_name, latent_dim): | ||
os.environ["WANDB_MODE"] = "disabled" | ||
|
||
runner = CliRunner() | ||
result = runner.invoke( | ||
main, | ||
[ | ||
"--solver-name", | ||
solver_name, | ||
"--function-name", | ||
function_name, | ||
"--latent-dim", | ||
str(latent_dim), | ||
"--max-iter", | ||
"3", | ||
"--n-initial-points", | ||
"2", | ||
"--no-strict-on-hash", | ||
"--force-run", | ||
"--solve-in-discrete-space", | ||
"--tag", | ||
"test", | ||
], | ||
) |
Oops, something went wrong.