Re-introduce fix for Hydra directory sync with multiple process (#5993)

* Add hydra fix that was missing from master

* Remove error commas

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Sean Naren 2021-02-17 11:24:57 +00:00 committed by GitHub
parent 6a9cec41a3
commit ba6290029a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,8 @@ class DDPPlugin(ParallelPlugin):
if _HYDRA_AVAILABLE:
if HydraConfig.initialized():
cwd = get_original_cwd()
os_cwd = f'"{os.getcwd()}"'
command += [f'hydra.run.dir={os_cwd}', f'hydra.job.name=train_ddp_process_{local_rank}']
proc = subprocess.Popen(command, env=env_copy, cwd=cwd)
self.interactive_ddp_procs.append(proc)