Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added and integrated C++ graphium_cpp library, a Python module implem… #510

Merged
merged 54 commits into from
Jul 9, 2024
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5ffe261
Added and integrated C++ graphium_cpp library, a Python module implem…
ndickson-nvidia Apr 13, 2024
8286383
Small changes to support not needing label data during data loading
ndickson-nvidia Apr 17, 2024
dca9b2b
Removed FakeDataset, FakeDataModule, and SingleTaskDataset. SingleTa…
ndickson-nvidia Apr 17, 2024
8304210
Removed option to featurize using Python, (but didn't delete everythi…
ndickson-nvidia Apr 17, 2024
4ee35d4
Removed newly deprecated options from yaml files
ndickson-nvidia Apr 18, 2024
cf23e37
Added support for limiting the number of threads used by prepare_and_…
ndickson-nvidia Apr 18, 2024
5db0e2a
Fixed compiler warning about signed vs. unsigned comparison
ndickson-nvidia Apr 18, 2024
c75a452
Fixed Python syntax issues
ndickson-nvidia Apr 18, 2024
4aa1f85
Changed asymmetric inverse normalization type to be implemented using…
ndickson-nvidia Apr 18, 2024
c53451a
Fixed compile errors
ndickson-nvidia Apr 18, 2024
268e245
Some simplification in collate.py
ndickson-nvidia Apr 19, 2024
e032e8e
Deleting most of the Python featurization code
ndickson-nvidia Apr 19, 2024
bdefe89
Implemented conformer generation in get_conformer_features, trying to…
ndickson-nvidia Apr 23, 2024
5298444
Deleted deprecated properties.py
ndickson-nvidia Apr 23, 2024
c38aa06
Handle case of no label data in prepare_and_save_data. Also added con…
ndickson-nvidia Apr 25, 2024
86abf21
Changed prepare_data to support having no label data
ndickson-nvidia Apr 25, 2024
80276da
Updated license passed to setup call in setup.py
ndickson-nvidia May 2, 2024
9492e62
Changes to get test_dataset.py and test_multitask_datamodule.py passing
ndickson-nvidia May 6, 2024
d94097c
Removed load_type option from test_training.py, because it's no longe…
ndickson-nvidia May 6, 2024
11e6935
Updated comment in setup.py about how to build graphium_cpp package
ndickson-nvidia May 14, 2024
ff93c2d
Rewrote test_featurizer.py. Fixed bug in mask_nans C++ function, and …
ndickson-nvidia May 14, 2024
a892068
Removed deprecation warnings and deprecated parameters from datamodul…
ndickson-nvidia May 23, 2024
38a5510
Recommended tweaks to extract_labels in multilevel_utils.py
ndickson-nvidia May 23, 2024
f7771b3
Fixed "else if"->"elif"
ndickson-nvidia May 23, 2024
4256839
Rewrote test_pe_nodepair.py to use graphium_cpp
ndickson-nvidia May 24, 2024
91c37a3
Rewrote test_pe_rw.py to use graphium_cpp. Comment update in test_pe_…
ndickson-nvidia May 24, 2024
f347a0d
Rewrote test_pe_spectral.py to use graphium_cpp
ndickson-nvidia May 24, 2024
26b5531
Removed tests/test_positional_encodings.py, because it's a duplicate …
ndickson-nvidia May 24, 2024
1ded38b
Fixed handling of disconnected components vs. single component for la…
ndickson-nvidia May 28, 2024
314d636
Fixed compile warnings in one_hot.cpp
ndickson-nvidia May 28, 2024
e49b4da
Rewrote test_positional_encoders.py, though it's still failing the te…
ndickson-nvidia May 28, 2024
f001464
Removed commented out lines from setup.py
ndickson-nvidia Jun 4, 2024
2782fbc
Ran linting on Python files
ndickson-nvidia Jun 4, 2024
77d27b5
Hopefully explicitly installing graphium_cpp fixes the automated test…
ndickson-nvidia Jun 5, 2024
cb1df19
Test fix
ndickson-nvidia Jun 5, 2024
f3f6a0d
Another test fix
ndickson-nvidia Jun 5, 2024
c5c0085
Another test fix
ndickson-nvidia Jun 5, 2024
6dd827f
Make sure RDKit can find Boost headers
ndickson-nvidia Jun 5, 2024
59c84a2
Reimplemented test_pos_transfer_funcs.py to test all supported conver…
ndickson-nvidia Jun 12, 2024
7bc8ade
Linting fixes
ndickson-nvidia Jun 12, 2024
6903243
Fixed collections.abs.Callable to typing.Callable for type hint
ndickson-nvidia Jun 12, 2024
9f38afb
Removed file_opener and its test
ndickson-nvidia Jun 17, 2024
5ab9ca9
Fixed the issue with boolean masking, introduced by `F._canonical_mas…
DomInvivo Jul 9, 2024
9c7504f
Fixed the float vs double issue in laplacian pos encoding
DomInvivo Jul 9, 2024
f8358f3
Added comment
DomInvivo Jul 9, 2024
692decc
Fixed the ipu tests by making sure that `IPUStrategy` is not imported…
DomInvivo Jul 9, 2024
8891e66
Update test.yml to only test python 3.10
DomInvivo Jul 9, 2024
c2d3c87
Removed positional encodings from the docs
DomInvivo Jul 9, 2024
d3d19d7
Merge remote-tracking branch 'origin/dom_unittest' into dom_unittest
DomInvivo Jul 9, 2024
0a1696f
Upgraded python versions in the tests
DomInvivo Jul 9, 2024
50265df
Removed reference to old files now in C++
DomInvivo Jul 9, 2024
58fc2aa
Downgraded python version
DomInvivo Jul 9, 2024
5852467
Fixed other docs broken references
DomInvivo Jul 9, 2024
ea9a775
Merge pull request #1 from ndickson-nvidia/dom_unittest
ndickson-nvidia Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Small changes to support not needing label data during data loading
  • Loading branch information
ndickson-nvidia committed Apr 17, 2024
commit 828638336662b2c2d3a6ec8548de52f6d5e3cf84
19 changes: 11 additions & 8 deletions graphium/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ class MultitaskDataset(Dataset):
def __init__(
self,
featurize_smiles: Callable[[str],dict],
task_names: List[str],
label_num_cols: List[int],
label_dtypes: List[int],
mol_file_data_offsets,
task_names: List[str] = None,
label_num_cols: List[int] = None,
label_dtypes: List[int] = None,
mol_file_data_offsets = None,
concat_smiles_tensor,
smiles_offsets_tensor,
num_nodes_tensor,
Expand Down Expand Up @@ -311,10 +311,13 @@ def __getitem__(self, idx):

smiles_str = graphium_cpp.extract_string(self.smiles_tensor, self.smiles_offsets_tensor, idx)

datum = {
"labels": self.load_graph_from_index(idx),
"features": self.featurize_smiles(smiles_str),
}
if self.mol_file_data_offsets is None:
datum = { "features": self.featurize_smiles(smiles_str) }
else:
datum = {
"labels": self.load_graph_from_index(idx),
"features": self.featurize_smiles(smiles_str),
}

# One of the featurization error handling options returns a string on error,
# instead of throwing an exception, so assume that the intention is to just skip,
Expand Down