Skip to content

Commit a01c309

Browse files
andrewjcgfacebook-github-bot
authored andcommitted
Fix Python code sync test (meta-pytorch#878)
Summary: Pull Request resolved: meta-pytorch#878 Make sure we spawn child procs after setting the workspace env var, so that they inherit it. Reviewed By: highker Differential Revision: D80267335 fbshipit-source-id: cd13865f76aa80bc5563334e35350544b7395332
1 parent a7caf35 commit a01c309

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/tests/test_python_actors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,12 +959,12 @@ async def ls(self) -> list[str]:
959959

960960

961961
async def test_sync_workspace() -> None:
962-
pm = await proc_mesh(gpus=1)
963-
964962
# create two workspaces: one for local and one for remote
965963
with tempfile.TemporaryDirectory() as workspace_src, tempfile.TemporaryDirectory() as workspace_dst, unittest.mock.patch.dict(
966964
os.environ, {"WORKSPACE_DIR": workspace_dst}
967965
):
966+
pm = await proc_mesh(gpus=1)
967+
968968
os.environ["WORKSPACE_DIR"] = workspace_dst
969969
config = defaults.config("slurm", workspace_src)
970970
await pm.sync_workspace(

0 commit comments

Comments
 (0)