Skip to content

Commit 2b9c1e5

Browse files
committed
fix data loading
1 parent 430c72c commit 2b9c1e5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • chebai_graph/preprocessing/datasets

chebai_graph/preprocessing/datasets/chebi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ def _merge_props_into_base(self, row: pd.Series | dict) -> GeomData:
296296
Returns:
297297
A GeomData object with merged features.
298298
"""
299-
geom_data = row["features"]
299+
if isinstance(row["features"], tuple):
300+
geom_data, _ = row["features"] # ignore additional returned data from _read_data (e.g. augmented molecule dict)
301+
else:
302+
geom_data = row["features"]
300303
assert isinstance(geom_data, GeomData)
301304
edge_attr = geom_data.edge_attr
302305
x = geom_data.x

0 commit comments

Comments
 (0)