Skip to content

Commit f34fe80

Browse files
committed
dyanmic import for nx
1 parent 2ba4932 commit f34fe80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chebai_graph/preprocessing/reader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from typing import List, Optional
33

44
import chebai.preprocessing.reader as dr
5-
import networkx as nx
65
import pysmiles as ps
76
import rdkit.Chem as Chem
87
import torch
@@ -93,6 +92,8 @@ def name(cls):
9392
return "graph"
9493

9594
def _read_data(self, raw_data) -> Optional[GeomData]:
95+
import networkx as nx
96+
9697
# raw_data is a SMILES string
9798
try:
9899
mol = ps.read_smiles(raw_data)

0 commit comments

Comments
 (0)