ffa0db4fdca9cef31a72b35a1f7eef78733f5b0c,glyph/cli/glyph_remote.py,RemoteAssessmentRunner,update_fitness,#RemoteAssessmentRunner#Any#Any#,239

Before Change


        if self.send_all:
            calculate_fitness = self.evaluate_all(population)
        else:
            calculate_fitness = [self.measure(ind) for ind in calculate]

        // save to cache
        for key, fit in zip(map(self._hash, calculate), calculate_fitness):
            self.cache[key] = fit

After Change


            self.queue = MyQueue(self.send, self.recv, self.result_queue, len(calculate))
            thread = Thread(target=self.queue.run)
            thread.start()
            with concurrent.futures.ThreadPoolExecutor(max_workers=len(calculate)) as executor:
                futures = {executor.submit(self.measure, ind): ind for ind in calculate}
                for future in futures:
                    calculate_fitness.append(future.result())
            thread.join()
            //calculate_fitness = [self.measure(ind) for ind in calculate]

        // save to cache
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: Ambrosys/glyph
Commit Name: ffa0db4fdca9cef31a72b35a1f7eef78733f5b0c
Time: 2017-02-24
Author: mquade@uni-potsdam.de
File Name: glyph/cli/glyph_remote.py
Class Name: RemoteAssessmentRunner
Method Name: update_fitness


Project Name: tensorflow/datasets
Commit Name: 39dbfb828e326036417b38de58d50ac42f9dfa28
Time: 2019-09-19
Author: pierrot@google.com
File Name: tensorflow_datasets/scripts/document_datasets.py
Class Name:
Method Name: make_module_to_builder_dict


Project Name: studioml/studio
Commit Name: 13986978d4545aa429a7fc233d8e39718d52e255
Time: 2020-08-11
Author: andrei.denissov@cognizant.com
File Name: studio/keyvalue_provider.py
Class Name: KeyValueProvider
Method Name: checkpoint_experiment