MCPcopy
hub / github.com/PRIME-RL/PRIME / _materialize_futures

Function _materialize_futures

training/verl/single_controller/base/decorator.py:379–391  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

377
378
379def _materialize_futures(*args, **kwargs):
380 new_args = []
381 for arg in args:
382 if isinstance(arg, DataProtoFuture):
383 arg = arg.get()
384 # add more type to materialize
385 new_args.append(arg)
386 for k, v in kwargs.items():
387 if isinstance(v, DataProtoFuture):
388 kwargs[k] = v.get()
389
390 new_args = tuple(new_args)
391 return new_args, kwargs
392
393
394def register(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL, blocking=True, materialize_futures=True):

Callers 1

innerFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected