Skip to content

Add more explanation to missing python actor object error #366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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
15 changes: 14 additions & 1 deletion python/monarch/actor_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,21 @@ async def handle_cast(
return None

if self.instance is None:
# This could happen because of the following reasons. Both
# indicates a possible bug in the framework:
# 1. the execution of the previous message for "__init__" failed,
# but that error is not surfaced to the caller.
# - TODO(T229200522): there is a known bug. fix it.
# 2. this message is delivered to this actor before the previous
# message of "__init__" is delivered. Out-of-order delivery
# should never happen. It indicates either a bug in the
# message delivery mechanism, or the framework accidentally
# mixed the usage of cast and direct send.
raise AssertionError(
"__init__ failed earlier and no Actor object is available"
f"""
actor object is missing when executing method {message.method}
on actor {mailbox.actor_id}
"""
)
the_method = getattr(self.instance, message.method)._method

Expand Down