Skip to content

Commit 4131f2b

Browse files
committed
fix ulimit
1 parent 9788b5c commit 4131f2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

train.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
from util.vis_tool import visdom_bbox
1616
from util.eval_tool import eval_detection_voc
1717

18+
# fix for ulimit
19+
# https://github.com/pytorch/pytorch/issues/973#issuecomment-346405667
20+
import resource
21+
rlimit = resource.getrlimit(resource.RLIMIT_NOFILE)
22+
resource.setrlimit(resource.RLIMIT_NOFILE, (20480, rlimit[1]))
23+
1824
matplotlib.use('agg')
1925

2026
def eval(dataloader, faster_rcnn, test_num=10000):

0 commit comments

Comments
 (0)