We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae2344e commit 5d63df5Copy full SHA for 5d63df5
test/unit/test_train.py
@@ -31,6 +31,7 @@ def fixture_training_env():
31
env = MagicMock()
32
env.current_host = 'algo-1'
33
env.hosts = ['algo-1']
34
+ env.master_hostname = 'algo-1'
35
env.network_interface_name = 'eth0'
36
tmp = tempfile.mkdtemp()
37
os.makedirs(os.path.join(tmp, 'model'))
@@ -96,7 +97,7 @@ def test_environment(training_env):
96
97
98
# distributed training specific environment
99
assert MASTER_PORT == os.environ['MASTER_PORT']
- assert training_env.hosts[0] == os.environ['MASTER_ADDR']
100
+ assert training_env.master_hostname == os.environ['MASTER_ADDR']
101
102
# nccl specific environment
103
assert training_env.network_interface_name == os.environ['NCCL_SOCKET_IFNAME']
0 commit comments