b048efa4f956b80266942caea6ee8b4311e1d17a,autokeras/classifier.py,ClassifierBase,fit,#ClassifierBase#Any#Any#Any#Any#Any#,119

Before Change


        def signal_handler(_, _1):
            raise TimeoutError("Timed out!")

        signal.signal(signal.SIGALRM, signal_handler)
        signal.alarm(time_limit)  // Ten seconds
        try:
            while True:
                p = multiprocessing.Process(target=run_searcher_once, args=(x_train, y_train, x_test, y_test, self.path))

After Change


            p.start()
            // Kill the process if necessary.
            while time.time() - start_time <= time_limit:
                if p.is_alive():
                    time.sleep(1)
                else:
                    break
            else:
                // If break above the code in this else won"t run
                p.terminate()
                p.join()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: jhfjhfj1/autokeras
Commit Name: b048efa4f956b80266942caea6ee8b4311e1d17a
Time: 2018-04-08
Author: jin@tamu.edu
File Name: autokeras/classifier.py
Class Name: ClassifierBase
Method Name: fit


Project Name: vatlab/SoS
Commit Name: b6d57e6705748b6589e0d0a38cfe190d131571bc
Time: 2019-02-24
Author: ben.bog@gmail.com
File Name: src/sos/workers.py
Class Name: SoS_Worker
Method Name: run