From fa8c0f69259929d7506724b9d985aac8877ad4c2 Mon Sep 17 00:00:00 2001 From: haosenwang1018 Date: Wed, 25 Feb 2026 03:50:20 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20bare=20except=20=E2=86=92=20except=20Exc?= =?UTF-8?q?eption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rdt/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdt/train.py b/rdt/train.py index 1356bc5..f884bcc 100644 --- a/rdt/train.py +++ b/rdt/train.py @@ -448,7 +448,7 @@ def save_model_hook(models, weights, output_dir): accelerator.print(f"Resuming from checkpoint {path}") try: accelerator.load_state(os.path.join(args.output_dir, path)) # load_module_strict=False - except: + except Exception: # load deepspeed's state_dict logger.info("Resuming training state failed. Attempting to only load from model checkpoint.") checkpoint = torch.load(os.path.join(args.output_dir, path, "pytorch_model", "mp_rank_00_model_states.pt"))