if os.path.exists(index_filename):
self.initialize_cache_files_with_index(index_filename)
else:
self._filenames = [f for f in self._filereader.listdir() if os.path.splitext(f)[
1].lower() == ".h5"]
for filename in self._filenames:
self.initialize_cache_files(filename)
logger.info("{}".format(len(self._cache_files)))
self._cache_reader_with_prefetch = CacheReaderWithPrefetch(
self._cachedir, self._num_of_threads, self._variables)