MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / generate_function

Function generate_function

training/verl/single_controller/ray/base.py:393–399  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

391 if hasattr(method, MAGIC_ATTR):
392
393 def generate_function(name):
394
395 def func(self, *args, **kwargs):
396 # dispatch to the actual worker
397 return getattr(self.worker_dict[key], name)(*args, **kwargs)
398
399 return func
400
401 func = generate_function(method_name)
402 # pass MAGIC_ATTR for outer worker group

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected