Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions python/monarch/_src/actor/proc_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,12 @@ def __init__(self) -> None:
# pyre-ignore
@endpoint
def get_or_spawn(
self, name: str, Class: Type[_ActorType], *args: Any, **kwargs: Any
self,
self_ref: "_ControllerControllerV0",
name: str,
Class: Type[_ActorType],
*args: Any,
**kwargs: Any,
) -> _ActorType:
if name not in self._controllers:
proc_mesh = _proc_mesh_from_allocator(
Expand Down Expand Up @@ -910,9 +915,8 @@ def get_or_spawn_controller_v0(
Returns:
A Future that resolves to a reference to the actor.
"""
return context().actor_instance._controller_controller.get_or_spawn.call_one(
name, Class, *args, **kwargs
)
cc = context().actor_instance._controller_controller
return cc.get_or_spawn.call_one(cc, name, Class, *args, **kwargs)


if v1_enabled or TYPE_CHECKING:
Expand Down