MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / check_network

Function check_network

verl/scripts/diagnose.py:151–167  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

149
150
151def check_network(args):
152 print("----------Network Test----------")
153 if args.timeout > 0:
154 print("Setting timeout: {}".format(args.timeout))
155 socket.setdefaulttimeout(10)
156 for region in args.region.strip().split(","):
157 r = region.strip().lower()
158 if not r:
159 continue
160 if r in REGIONAL_URLS:
161 URLS.update(REGIONAL_URLS[r])
162 else:
163 import warnings
164
165 warnings.warn("Region {} do not need specific test, please refer to global sites.".format(r), stacklevel=2)
166 for name, url in URLS.items():
167 test_connection(name, url, args.timeout)
168
169
170def check_environment():

Callers 1

diagnose.pyFile · 0.85

Calls 3

test_connectionFunction · 0.85
splitMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected