Skip to content

Commit

Permalink
reraise on except
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackmin801 committed Nov 5, 2024
1 parent a88619c commit 7424fd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/zeroband/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,9 @@ def train(config: Config):

try:
train(config)
except: # noqa
except Exception as e:
# Subprocesses can prevent the main process from exiting, so we need to terminate them
for p in _children:
p.terminate()

raise e

0 comments on commit 7424fd3

Please sign in to comment.