Unverified Commit 0f236050 authored by Sourab Mangrulkar's avatar Sourab Mangrulkar Committed by GitHub
Browse files

reset accelerate env variables after each test (#24107)

parent 5fa0a1b2
......@@ -1339,6 +1339,11 @@ class TestCasePlus(unittest.TestCase):
AcceleratorState._reset_state()
PartialState._reset_state()
# delete all the env variables having `ACCELERATE` in them
for k in list(os.environ.keys()):
if "ACCELERATE" in k:
del os.environ[k]
def mockenv(**kwargs):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment