Skip to content

Commit

Permalink
Fix 4649 (#4650)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Wyatt <michaelwyatt@microsoft.com>
  • Loading branch information
Alienfeel and mrwyattii committed Dec 15, 2023
1 parent d37fc25 commit 65b7727
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deepspeed/launcher/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,11 @@ def main(args=None):
if not args.master_addr:
assert multi_node_exec
first_host = list(active_resources.keys())[0]
hostname_cmd = [f"ssh {first_host} hostname -I"]
ssh_check_cmd = "ssh "
if args.ssh_port is not None:
ssh_check_cmd += f" -p {args.ssh_port}"
ssh_check_cmd += f" {first_host} hostname -I"
hostname_cmd = [ssh_check_cmd]
try:
result = subprocess.check_output(hostname_cmd, shell=True)
except subprocess.CalledProcessError as err:
Expand Down

0 comments on commit 65b7727

Please sign in to comment.