Skip to content

Commit

Permalink
* disctibute rank initialization fix (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
Squire-tomsk authored Oct 19, 2023
1 parent 340aeac commit 47781f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trainer/distribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def distribute():
for rank, local_gpu_id in enumerate(gpus):
my_env = os.environ.copy()
my_env["PYTHON_EGG_CACHE"] = f"/tmp/tmp{local_gpu_id}"
my_env["RANK"] = f"{local_gpu_id}"
my_env["RANK"] = f"{rank}"
my_env["CUDA_VISIBLE_DEVICES"] = f"{','.join(gpus)}"
command[-1] = f"--rank={rank}"
# prevent stdout for processes with rank != 0
Expand Down

0 comments on commit 47781f5

Please sign in to comment.