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

Function submit_task

modelscope/hub/push_to_hub.py:188–204  ·  view source on GitHub ↗
(q, b)

Source from the content-addressed store, hash-verified

186
187
188def submit_task(q, b):
189 while True:
190 b.value = False
191 item = q.get()
192 logger.info(item)
193 b.value = True
194 if not item.pop('done', False):
195 delete_dir = item.pop('delete_dir', False)
196 output_dir = item.get('output_dir')
197 try:
198 push_to_hub(**item)
199 if delete_dir and os.path.exists(output_dir):
200 shutil.rmtree(output_dir)
201 except Exception as e:
202 logger.error(e)
203 else:
204 break
205
206
207class UploadStrategy:

Callers

nothing calls this directly

Calls 4

push_to_hubFunction · 0.85
infoMethod · 0.80
getMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…