Skip to content

Commit 5b6e737

Browse files
authored
Merge pull request #144 from sinzlab/mohammadbashiri-patch-1
Update dj_helpers.py
2 parents 50cbe12 + 6634ec4 commit 5b6e737

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

nnfabrik/templates/transfer/transferred_trained_model.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import tempfile
2-
from collections import Mapping, Sequence
2+
3+
try:
4+
from collections import Mapping, Sequence
5+
except:
6+
from collections.abc import Mapping, Sequence
37

48
import torch
59
import os

nnfabrik/utility/dj_helpers.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
import inspect
1010
from datetime import date, datetime
1111
from datajoint.utils import to_camel_case
12-
from collections import OrderedDict, Iterable, Mapping
12+
from collections import OrderedDict
13+
14+
try:
15+
from collections import Iterable, Mapping
16+
except:
17+
from collections.abc import Iterable, Mapping
1318

1419
# try/except is necessary to support all versions of dj
1520
try:

0 commit comments

Comments
 (0)