p.start()
p.join()
except TimeoutError:
if self.verbose:
print("Timed is up!")
return
def predict(self, x_test):
Return predict result for the testing data.
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()