Skip to content

Commit 01120e4

Browse files
ppwwyyxxfacebook-github-bot
authored andcommitted
fix MapDataset creation in python 3.9
Summary: fix facebookresearch#3405 The old code works for python 3.6 & 3.7; fails for python 3.9 Reviewed By: zhanghang1989 Differential Revision: D30599139 fbshipit-source-id: ab9e5d68387b68e1095112e9c2531a971567accc
1 parent 11528ce commit 01120e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

detectron2/data/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __new__(cls, dataset, map_func):
7474
if is_iterable:
7575
return _MapIterableDataset(dataset, map_func)
7676
else:
77-
return super().__new__(cls, dataset, map_func)
77+
return super().__new__(cls)
7878

7979
def __getnewargs__(self):
8080
return self._dataset, self._map_func

0 commit comments

Comments
 (0)