p = multiprocessing.Process(target=run_searcher_once, args=(x_train, y_train, x_test, y_test, self.path))
p.start()
// Kill the process if necessary.
while time.time() - start_time <= time_limit:
if p.is_alive():
time.sleep(1)
else:
After Change
pickle.dump(self, open(os.path.join(self.path, "classifier"), "wb"))
pickle_to_file(self, os.path.join(self.path, "classifier"))
if time_limit is None:
time_limit = 24*60*60
start_time = time.time()
while time.time() - start_time <= time_limit:
run_searcher_once(x_train, y_train, x_test, y_test, self.path)
if len(self.load_searcher().history) >= constant.MAX_MODEL_NUM: