Skip to content

Commit

Permalink
[Deepspeed] zero3 tests band aid (huggingface#11235)
Browse files Browse the repository at this point in the history
* temp band-aid

* style
  • Loading branch information
stas00 authored Apr 13, 2021
1 parent 1ad7b03 commit 3d339ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/deepspeed/test_deepspeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ def setUp(self):
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])
Expand Down

0 comments on commit 3d339ee

Please sign in to comment.