diff --git a/deepspeed/__init__.py b/deepspeed/__init__.py index 9e2e25513a72..bead98a40a51 100755 --- a/deepspeed/__init__.py +++ b/deepspeed/__init__.py @@ -10,6 +10,7 @@ from torch.optim import Optimizer from torch.optim.lr_scheduler import _LRScheduler from packaging import version as pkg_version +import subprocess from . import ops from . import module_inject @@ -116,6 +117,11 @@ def initialize(args=None, __git_branch__), ranks=[0]) + hostname_cmd = ["hostname -I"] + result = subprocess.check_output(hostname_cmd, shell=True) + hostname = result.decode('utf-8').split()[0] + print("Host: {}".format(hostname)) + # Disable zero.Init context if it's currently enabled zero.partition_parameters.shutdown_init_context()