MCPcopy Create free account
hub / github.com/modelscope/modelscope / async_run_command_with_popen

Function async_run_command_with_popen

tests/run.py:167–179  ·  view source on GitHub ↗
(cmd, device_id)

Source from the content-addressed store, hash-verified

165
166
167def async_run_command_with_popen(cmd, device_id):
168 logger.info('Worker id: %s args: %s' % (device_id, cmd))
169 env = os.environ.copy()
170 env['CUDA_VISIBLE_DEVICES'] = '%s' % device_id
171 sub_process = subprocess.Popen(
172 cmd,
173 stdout=subprocess.PIPE,
174 stderr=subprocess.STDOUT,
175 bufsize=1,
176 universal_newlines=True,
177 env=env,
178 encoding='utf8')
179 return sub_process
180
181
182def save_test_result(df, args):

Callers 2

parallel_run_caseFunction · 0.85
parallel_run_case_in_envFunction · 0.85

Calls 2

infoMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…