kmn1024
2025-06-25 443bc09c11f3cf89ffc573aab2021f0c933aa5b3
Bugfix: Only allow rank==0 to clean up old checkpoints (#2558)

Fixes bug: https://github.com/modelscope/FunASR/issues/2557
1个文件已修改
1 ■■■■ 已修改文件
funasr/train_utils/trainer_ds.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/train_utils/trainer_ds.py
@@ -272,6 +272,7 @@
                    )
            else:
                print("Undo")
            if self.rank == 0:
            self.saved_ckpts[ckpt_name] = getattr(
                self, f"val_{self.avg_keep_nbest_models_type}_step_or_epoch"
            )[ckpt_name]