Skip to content

Commit

Permalink
fix nonetype reference when ctrl+c
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Sep 14, 2024
1 parent 4a633a3 commit a997ec4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
logger.setLevel(environ.get("SIMPLETUNER_LOG_LEVEL", "INFO"))

if __name__ == "__main__":
global bf
bf = None
trainer = None
try:
import multiprocessing
Expand Down Expand Up @@ -64,4 +62,4 @@
print(e)
print(traceback.format_exc())
if trainer is not None and trainer.bf is not None:
bf.stop_fetching()
trainer.bf.stop_fetching()

0 comments on commit a997ec4

Please sign in to comment.