diff --git a/python/monarch/_src/actor/actor_mesh.py b/python/monarch/_src/actor/actor_mesh.py index 2c29083f..4e7cebf2 100644 --- a/python/monarch/_src/actor/actor_mesh.py +++ b/python/monarch/_src/actor/actor_mesh.py @@ -50,6 +50,7 @@ OncePortRef, PortReceiver as HyPortReceiver, PortRef, + UndeliverablePortReceiver, ) from monarch._rust_bindings.monarch_hyperactor.proc import ActorId from monarch._rust_bindings.monarch_hyperactor.shape import Point as HyPoint, Shape @@ -727,6 +728,11 @@ def _pickle(obj: object) -> bytes: class Actor(MeshTrait): + def __init__(self) -> None: + # Bind undeliverable message port + # TODO: Temporary fix to avoid warning spam. Fix tracked in T230700229 + undeliverable_receiver() + @functools.cached_property def logger(cls) -> logging.Logger: lgr = logging.getLogger(cls.__class__.__name__) @@ -877,6 +883,10 @@ def current_rank() -> Point: return ctx.point +def undeliverable_receiver() -> UndeliverablePortReceiver: + return MonarchContext.get().mailbox.undeliverable_receiver() + + def current_size() -> Dict[str, int]: ctx = MonarchContext.get() return dict(zip(ctx.point.shape.labels, ctx.point.shape.ndslice.sizes))