From a997ec49c03f4aa731a79e072ade222890ab7c35 Mon Sep 17 00:00:00 2001 From: bghira Date: Sat, 14 Sep 2024 12:38:44 -0600 Subject: [PATCH] fix nonetype reference when ctrl+c --- train.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/train.py b/train.py index cb63532b..b3c72a18 100644 --- a/train.py +++ b/train.py @@ -8,8 +8,6 @@ logger.setLevel(environ.get("SIMPLETUNER_LOG_LEVEL", "INFO")) if __name__ == "__main__": - global bf - bf = None trainer = None try: import multiprocessing @@ -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()