From 0aa8e4c0bc0a990f6614e20fa4e66d5fbef3ec06 Mon Sep 17 00:00:00 2001 From: Jong Choi Date: Wed, 3 Jul 2024 12:14:32 -0400 Subject: [PATCH] Adding HYDRAGNN_MASTER_PORT (#263) Adding HYDRAGNN_MASTER_ADDR env to set custom DDP port. --- hydragnn/utils/distributed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydragnn/utils/distributed.py b/hydragnn/utils/distributed.py index 2c75e19a8..6b21670fb 100644 --- a/hydragnn/utils/distributed.py +++ b/hydragnn/utils/distributed.py @@ -130,7 +130,7 @@ def setup_ddp(): ## Default setting master_addr = "127.0.0.1" - master_port = "8889" + master_port = os.getenv("HYDRAGNN_MASTER_PORT", "8889") if os.getenv("HYDRAGNN_MASTER_ADDR") is not None: master_addr = os.environ["HYDRAGNN_MASTER_ADDR"]