Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
0f236050
Unverified
Commit
0f236050
authored
Jun 08, 2023
by
Sourab Mangrulkar
Committed by
GitHub
Jun 08, 2023
Browse files
reset accelerate env variables after each test (#24107)
parent
5fa0a1b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/transformers/testing_utils.py
src/transformers/testing_utils.py
+5
-0
No files found.
src/transformers/testing_utils.py
View file @
0f236050
...
...
@@ -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
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment