Skip to content

Commit c1316e5

Browse files
authored
Import pydot first before trying backups (#20682)
1 parent 3dd958b commit c1316e5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

keras/src/utils/model_visualization.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
from keras.src.utils import io_utils
99

1010
try:
11-
# pydot-ng is a fork of pydot that is better maintained.
12-
import pydot_ng as pydot
11+
import pydot
1312
except ImportError:
14-
# pydotplus is an improved version of pydot
13+
# pydot_ng and pydotplus are older forks of pydot
14+
# which may still be used by some users
1515
try:
16-
import pydotplus as pydot
16+
import pydot_ng as pydot
1717
except ImportError:
18-
# Fall back on pydot if necessary.
1918
try:
20-
import pydot
19+
import pydotplus as pydot
2120
except ImportError:
2221
pydot = None
2322

0 commit comments

Comments
 (0)