From 2f18f04dfac379cfb4820f76b79a67dd27c7f602 Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Wed, 26 Jun 2024 03:51:20 +0800 Subject: [PATCH] fix(UT): rm extra `tearDown` in test_training.py (#3906) Fix #3901 . ## Summary by CodeRabbit - **Tests** - Improved test reliability by updating cleanup logic in `test_dp_train` and `test_trainable` methods. --- source/tests/pt/test_training.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/tests/pt/test_training.py b/source/tests/pt/test_training.py index c7094712ad..2926465775 100644 --- a/source/tests/pt/test_training.py +++ b/source/tests/pt/test_training.py @@ -66,8 +66,6 @@ def test_dp_train(self): ) trainer_finetune_empty.run() - self.tearDown() - def test_trainable(self): fix_params = deepcopy(self.config) fix_params["model"]["descriptor"]["trainable"] = False @@ -96,8 +94,6 @@ def test_trainable(self): model_dict_before_training[key], model_dict_after_training[key] ) - self.tearDown() - def tearDown(self): for f in os.listdir("."): if f.startswith("model") and f.endswith(".pt"):