MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / decorator

Function decorator

eval_code/recons/models/moge/utils/tools.py:234–247  ·  view source on GitHub ↗
(fn: Callable)

Source from the content-addressed store, hash-verified

232 pbar = tqdm(total=len(inputs) if hasattr(inputs, '__len__') else None)
233
234 def decorator(fn: Callable):
235 with (
236 ThreadPoolExecutor(max_workers=num_workers) as executor,
237 pbar
238 ):
239 pbar.refresh()
240 @catch_exception
241 @suppress_traceback
242 def _fn(input):
243 ret = fn(input)
244 pbar.update()
245 return ret
246 executor.map(_fn, inputs)
247 executor.shutdown(wait=True)
248
249 return decorator
250

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected