Skip to content

Commit

Permalink
Replace tmpdir with tmp_path in test
Browse files Browse the repository at this point in the history
  • Loading branch information
nisheethlahoti committed Jul 28, 2023
1 parent d3903d1 commit 3d43d23
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ def task_fn(cfg):
@RunIf(min_cuda_gpus=2, skip_windows=True, standalone=True)
@pytest.mark.skipif(not _HYDRA_WITH_RUN_PROCESS, reason=str(_HYDRA_WITH_RUN_PROCESS))
@pytest.mark.parametrize("subdir", [None, "null", "dksa", ".hello"])
def test_ddp_with_hydra_runjob(subdir, tmpdir, monkeypatch):
monkeypatch.chdir(tmpdir)
def test_ddp_with_hydra_runjob(subdir, tmp_path, monkeypatch):
monkeypatch.chdir(tmp_path)

# Save script locally
with open("temp.py", "w") as fn:
fn.write(script)

# Run CLI
devices = 2
run_dir = Path(tmpdir) / "hydra_output"
run_dir = tmp_path / "hydra_output"
cmd = [sys.executable, "temp.py", f"+devices={devices}", '+strategy="ddp"', f"hydra.run.dir={run_dir}"]
if subdir is not None:
cmd += [f"hydra.output_subdir={subdir}"]
Expand Down

0 comments on commit 3d43d23

Please sign in to comment.