From 3d339ee6595b9e42925559ae21a0f6e77f032873 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Tue, 13 Apr 2021 14:58:09 -0700 Subject: [PATCH] [Deepspeed] zero3 tests band aid (#11235) * temp band-aid * style --- tests/deepspeed/test_deepspeed.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/deepspeed/test_deepspeed.py b/tests/deepspeed/test_deepspeed.py index 9baaf3085b..6dd892940f 100644 --- a/tests/deepspeed/test_deepspeed.py +++ b/tests/deepspeed/test_deepspeed.py @@ -115,6 +115,12 @@ class TrainerIntegrationDeepSpeed(TestCasePlus, TrainerIntegrationCommon): with io.open(self.ds_config_file[ZERO3], "r", encoding="utf-8") as f: self.ds_config_dict[ZERO3] = json.load(f) + def tearDown(self): + # XXX: Fixme - this is a temporary band-aid since this global variable impacts other tests + import transformers + + transformers.integrations._is_deepspeed_zero3_enabled = None + def get_config_dict(self, stage): """ As the tests modify the dict, always make a copy """ config = deepcopy(self.ds_config_dict[stage])