MCPcopy Create free account
hub / github.com/THUDM/GLM / get_hostname

Function get_hostname

utils.py:52–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def get_hostname():
53 hostname_cmd = ["hostname -I"]
54 result = subprocess.check_output(hostname_cmd, shell=True)
55 master_addr = result.decode('utf-8').split()[0]
56 return master_addr
57
58
59def get_spare_port(args):

Callers 1

mpi_define_envFunction · 0.90

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected