We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 138d24d commit 77c11a5Copy full SHA for 77c11a5
1 file changed
gllm/worker.py
@@ -194,15 +194,17 @@ def run_other(self):
194
self.forward_pp()
195
196
def handle_keyboardInterrupt(self):
197
- logger.info(f'Exit')
198
- dist.destroy_process_group()
199
self.mp_alive[self.local_rank] = -1
+ logger.info(f'Exit')
+ if dist.is_initialized():
200
+ dist.destroy_process_group()
201
202
def handle_exception(self, e):
203
+ self.mp_alive[self.local_rank] = -1
204
logger.error(e)
205
traceback.print_exc()
- self.mp_alive[self.local_rank] = -1
206
207
208
209
210
def run_worker(worker: Worker):
0 commit comments