-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86b09cd
commit 9504a61
Showing
6 changed files
with
63 additions
and
11 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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
""" | ||
Pytest-based unit tests for the molecular property | ||
prediction data loader. | ||
""" | ||
|
||
import pytest | ||
|
||
import os | ||
import itertools | ||
from gauche.dataloader import DataLoaderMP | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"dataset, representation", | ||
[ | ||
(d, f) | ||
for d, f in itertools.product( | ||
["Photoswitch", "ESOL", "FreeSolv", "Lipophilicity"], | ||
[ | ||
"ecfp_fingerprints", | ||
"fragments", | ||
"ecfp_fragprints", | ||
"molecular_graphs", | ||
"bag_of_smiles", | ||
"bag_of_selfies", | ||
"mqn", | ||
], | ||
) | ||
], | ||
) | ||
def test_benchmark_loading(dataset, representation): | ||
""" | ||
Test if all benchmarks can be loaded with all representation. | ||
""" | ||
|
||
dataset_root = os.path.abspath( | ||
os.path.join("..", "..", "data", "property_prediction") | ||
) | ||
|
||
dataloader = DataLoaderMP() | ||
dataloader.load_benchmark( | ||
dataset, path=os.path.join(dataset_root, dataset + ".csv") | ||
) | ||
dataloader.featurize(representation) |
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