MCPcopy Create free account
hub / github.com/RL-Align/RL-Kernel / FakeRemoteActorClass

Class FakeRemoteActorClass

tests/test_ray_actor_manager.py:50–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49
50class FakeRemoteActorClass:
51 def __init__(self, fake_ray, actor_class, options=None):
52 self.fake_ray = fake_ray
53 self.actor_class = actor_class
54 self._options = dict(options or {})
55
56 def options(self, **kwargs):
57 merged = dict(self._options)
58 merged.update(kwargs)
59 self.fake_ray.option_calls.append(merged)
60 return FakeRemoteActorClass(self.fake_ray, self.actor_class, merged)
61
62 def remote(self, *args, **kwargs):
63 actor = FakeActorHandle(self.actor_class(*args, **kwargs), dict(self._options))
64 self.fake_ray.actors.append(actor)
65 return actor
66
67
68class FakeRayModule:

Callers 2

optionsMethod · 0.85
remoteMethod · 0.85

Calls

no outgoing calls

Tested by 2

optionsMethod · 0.68
remoteMethod · 0.68