From e4d0f7f3104cce6bce19684eca6ff356eb09be16 Mon Sep 17 00:00:00 2001 From: Zach Mueller Date: Mon, 28 Aug 2023 18:18:41 +0000 Subject: [PATCH] Try with raw subprocess --- tests/test_multigpu.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_multigpu.py b/tests/test_multigpu.py index 5ddf6a9eccd..8904d330910 100644 --- a/tests/test_multigpu.py +++ b/tests/test_multigpu.py @@ -14,6 +14,7 @@ import inspect import os +import subprocess import unittest import torch @@ -72,6 +73,7 @@ def test_notebook_launcher(self): This test checks that the `notebook_launcher` will be able to intialize a `PartialState` without issue """ + cmd = [ "python", "-m", @@ -79,8 +81,7 @@ def test_notebook_launcher(self): "--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__":