From 55adfbeb8d11a2685a8d8812e6af78fe46378362 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Tue, 30 Nov 2021 17:02:27 -0800 Subject: [PATCH] Add commented code to increase open file limit via Python (for TFDS dataset building) --- timm/data/parsers/parser_tfds.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/timm/data/parsers/parser_tfds.py b/timm/data/parsers/parser_tfds.py index ee5893c4..739f3813 100644 --- a/timm/data/parsers/parser_tfds.py +++ b/timm/data/parsers/parser_tfds.py @@ -22,6 +22,10 @@ try: print("Warning: This version of tfds doesn't have the latest even_splits impl. " "Please update or use tfds-nightly for better fine-grained split behaviour.") has_buggy_even_splits = True + # NOTE uncomment below if having file limit issues on dataset build (or alter your OS defaults) + # import resource + # low, high = resource.getrlimit(resource.RLIMIT_NOFILE) + # resource.setrlimit(resource.RLIMIT_NOFILE, (high, high)) except ImportError as e: print(e) print("Please install tensorflow_datasets package `pip install tensorflow-datasets`.")