f59fb87d9613da132096e85b60cf6c0a8efc1cf6,python/src/nnabla/utils/data_source_implements.py,CacheDataSource,__init__,#CacheDataSource#Any#Any#Any#Any#,281

Before Change


        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)

After Change


            self._cachedir, self._num_of_threads, self._variables)
        self._thread_lock = threading.Lock()

        self._original_order = []
        for i in range(len(self._cache_files)):
            filename, length = self._cache_files[i]
            for j in range(length):
                self._original_order.append((filename, j))

        self.reset()

    def reset(self):
        with self._thread_lock:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: sony/nnabla
Commit Name: f59fb87d9613da132096e85b60cf6c0a8efc1cf6
Time: 2018-09-24
Author: Yukio.Oobuchi@sony.com
File Name: python/src/nnabla/utils/data_source_implements.py
Class Name: CacheDataSource
Method Name: __init__


Project Name: rtavenar/tslearn
Commit Name: 7eda0ba9f842e7b125f397182abd513d5d22b17d
Time: 2018-04-21
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/datasets.py
Class Name: UCR_UEA_datasets
Method Name: list_datasets


Project Name: EpistasisLab/tpot
Commit Name: ef29cd9bde8695645d63ae7f568fb298809e7b19
Time: 2018-10-15
Author: weixuanf@pennmedicine.upenn.edu
File Name: tpot/builtins/dataset_selector.py
Class Name: DatasetSelector
Method Name: fit