mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
update resource limit (#700)
This commit is contained in:
parent
259eeb08c8
commit
00defd6b7f
@ -14,8 +14,9 @@ if platform.system() != 'Windows':
|
||||
# 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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user