Skip to content

Commit 00459a5

Browse files
: python: actor: skip this_host() shutdown (#2171)
Summary: D89052078 changed the implementation of `shutdown_context()` but unfortunately as written it can't work and generates a runtime error: "cannot shut down `HostMesh` that is a reference instead of owned". skip the explicit shutdown while we work out a better fix. Reviewed By: colin2328 Differential Revision: D89478006
1 parent 81f8e36 commit 00459a5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

python/monarch/_src/actor/actor_mesh.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,14 @@ def shutdown_context() -> "Future[None]":
381381
"""
382382
from monarch._src.actor.future import Future
383383

384-
client_host_ctx = _client_context.try_get()
385-
if client_host_ctx is not None:
386-
host_mesh = client_host_ctx.actor_instance.proc_mesh.host_mesh
387-
return host_mesh.shutdown()
384+
# TODO(shayne,2025-12-18): Since D89089836 we can't call shutdown
385+
# like this and doing so is causing runtime errors. This avoids
386+
# the error while I work out a better fix.
387+
388+
# client_host_ctx = _client_context.try_get()
389+
# if client_host_ctx is not None:
390+
# host_mesh = client_host_ctx.actor_instance.proc_mesh.host_mesh
391+
# return host_mesh.shutdown()
388392

389393
# Nothing to shutdown - return a completed future
390394
async def noop() -> None:

0 commit comments

Comments
 (0)