Skip to content

Commit d2fe1d2

Browse files
committed
fix reader none error
1 parent 79fc500 commit d2fe1d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

chebai_graph/preprocessing/reader/static_gni.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ def name(self) -> str:
4040

4141
def _read_data(self, raw_data):
4242
data: GeomData = super()._read_data(raw_data)
43+
if data is None:
44+
return None
45+
4346
random_x = torch.empty(data.x.shape[0], self.num_node_properties)
4447
random_edge_attr = torch.empty(
45-
data.edge_index.shape[1], self.num_bond_properties
48+
data.edge_attr.shape[0], self.num_bond_properties
4649
)
4750
random_molecule_properties = torch.empty(1, self.num_molecule_properties)
4851

0 commit comments

Comments
 (0)