Skip to content

Commit f5d3cb8

Browse files
committed
sort as per node prop to same seq as baseline for fair comparison
1 parent ca3f305 commit f5d3cb8

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

chebai_graph/preprocessing/datasets/chebi.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ def __init__(
7676
assert isinstance(self.properties, list) and all(
7777
isinstance(p, MolecularProperty) for p in self.properties
7878
)
79-
rank_zero_info(
80-
f"Data module uses these properties (ordered): {', '.join([str(p) for p in properties])}"
81-
)
8279
self.transform = transform
8380

8481
def _setup_properties(self) -> None:
@@ -188,6 +185,9 @@ def __init__(
188185
f"[Info] Atom-level features will be zero-padded with "
189186
f"{self.zero_pad_atom} additional dimensions."
190187
)
188+
print(
189+
f"Data module uses these properties (ordered): {', '.join([str(p) for p in self.properties])}"
190+
)
191191

192192
def _merge_props_into_base(self, row: pd.Series) -> GeomData:
193193
"""
@@ -310,6 +310,10 @@ def __init__(self, properties=None, transform=None, **kwargs):
310310
if not isinstance(prop, AllNodeTypeProperty)
311311
]
312312
self.properties = first + rest
313+
print(
314+
"Properties are sorted so that `AllNodeTypeProperty` properties are first in sequence and rest of the order remains same\n",
315+
f"Data module uses these properties (ordered): {', '.join([str(p) for p in self.properties])}",
316+
)
313317

314318
def load_processed_data_from_file(self, filename: str) -> list[dict]:
315319
"""

configs/data/chebi50_aug_prop_as_per_node.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ init_args:
44
# All Node type properties
55
- chebai_graph.preprocessing.properties.AtomNodeLevel
66
# Atom Node type properties
7-
- chebai_graph.preprocessing.properties.AugAtomType
8-
- chebai_graph.preprocessing.properties.AugNumAtomBonds
9-
- chebai_graph.preprocessing.properties.AugAtomCharge
107
- chebai_graph.preprocessing.properties.AugAtomAromaticity
8+
- chebai_graph.preprocessing.properties.AugAtomCharge
119
- chebai_graph.preprocessing.properties.AugAtomHybridization
1210
- chebai_graph.preprocessing.properties.AugAtomNumHs
11+
- chebai_graph.preprocessing.properties.AugAtomType
12+
- chebai_graph.preprocessing.properties.AugNumAtomBonds
1313
# FG Node type properties
1414
- chebai_graph.preprocessing.properties.AtomFunctionalGroup
1515
- chebai_graph.preprocessing.properties.IsHydrogenBondDonorFG
@@ -19,6 +19,6 @@ init_args:
1919
- chebai_graph.preprocessing.properties.RDKit2DNormalized
2020
# Bond properties
2121
- chebai_graph.preprocessing.properties.BondLevel
22-
- chebai_graph.preprocessing.properties.AugBondType
23-
- chebai_graph.preprocessing.properties.AugBondInRing
2422
- chebai_graph.preprocessing.properties.AugBondAromaticity
23+
- chebai_graph.preprocessing.properties.AugBondInRing
24+
- chebai_graph.preprocessing.properties.AugBondType

0 commit comments

Comments
 (0)