def _handle_epoch_interrupt(self, signal_number, frame):
# Try to complete the current epoch if user presses CTRL + C
logger.warning('Received epoch interrupt signal.' +
epoch_interrupt_message)
signal.signal(signal.SIGINT, self._handle_batch_interrupt)
self.log.current_row['epoch_interrupt_received'] = True
# Add a record to the status. Unlike the log record it will be
# easy to access at later iterations.
self.status['epoch_interrupt_received'] = True
评论列表
文章目录