Skip to content

Commit 19e877f

Browse files
authored
Merge pull request #11690 from typhoonzero/fix_trainer_nccl2_env
fix trainer nccl2 env
2 parents 5082642 + a2e43ae commit 19e877f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/fluid/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def _transpile_nccl2_dist(self):
315315
for ip in worker_ips.split(","):
316316
worker_endpoints.append(':'.join([ip, port]))
317317
self.num_trainers = len(worker_endpoints)
318-
current_endpoint = os.getenv("POD_IP") + ":" + port
318+
current_endpoint = os.getenv("PADDLE_CURRENT_IP") + ":" + port
319319
worker_endpoints.remove(current_endpoint)
320320
# TODO(wuyi): use self.nccl_id_var, self.num_trainers and self.trainer_id
321321
# in ParallelExecutor to start

0 commit comments

Comments
 (0)