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

Function check_hardware

verl/scripts/diagnose.py:135–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133
134
135def check_hardware():
136 print("----------Hardware Info----------")
137 print("machine :", platform.machine())
138 print("processor :", platform.processor())
139 if sys.platform.startswith("darwin"):
140 pipe = subprocess.Popen(("sysctl", "-a"), stdout=subprocess.PIPE)
141 output = pipe.communicate()[0]
142 for line in output.split(b"\n"):
143 if b"brand_string" in line or b"features" in line:
144 print(line.strip())
145 elif sys.platform.startswith("linux"):
146 subprocess.call(["lscpu"])
147 elif sys.platform.startswith("win32"):
148 subprocess.call(["wmic", "cpu", "get", "name"])
149
150
151def check_network(args):

Callers 1

diagnose.pyFile · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected