Skip to content

Commit

Permalink
Try with raw subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerzr committed Aug 28, 2023
1 parent ce870e1 commit e4d0f7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_multigpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import inspect
import os
import subprocess
import unittest

import torch
Expand Down Expand Up @@ -72,15 +73,15 @@ def test_notebook_launcher(self):
This test checks that the `notebook_launcher` will be able to intialize
a `PartialState` without issue
"""

cmd = [
"python",
"-m",
"accelerate.test_utils.scripts.test_notebook",
"--num_processes",
str(torch.cuda.device_count()),
]
with patch_environment(omp_num_threads=1):
execute_subprocess_async(cmd, env=os.environ.copy())
subprocess.run(cmd, env=os.environ.copy(), check=True)


if __name__ == "__main__":
Expand Down

0 comments on commit e4d0f7f

Please sign in to comment.