Skip to content

Commit

Permalink
update resource limit (open-mmlab#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-s13 authored Jul 19, 2021
1 parent f1ec111 commit fe4fdad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmpose/datasets/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
# https://github.com/pytorch/pytorch/issues/973
import resource
rlimit = resource.getrlimit(resource.RLIMIT_NOFILE)
base_soft_limit = rlimit[0]
hard_limit = rlimit[1]
soft_limit = min(4096, hard_limit)
soft_limit = min(max(4096, base_soft_limit), hard_limit)
resource.setrlimit(resource.RLIMIT_NOFILE, (soft_limit, hard_limit))

DATASETS = Registry('dataset')
Expand Down

0 comments on commit fe4fdad

Please sign in to comment.