Skip to content

Worker killed error #78

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

Merged
merged 7 commits into from
Oct 27, 2024
Merged

Worker killed error #78

merged 7 commits into from
Oct 27, 2024

Conversation

apoorvkh
Copy link
Owner

No description provided.

@apoorvkh
Copy link
Owner Author

apoorvkh commented Oct 27, 2024

Notes:

  • We should annotate all the places where failures occur.
    • If the user's program raises an exception, our worker processes catch it and return that as a WorkerException.
    • If any worker process fails (due to raised exception or signal/exit), ctx.wait(5) captures this as a failure. We return that as a WorkerKilledError.
    • I think launcher_agent_group.sync_agent_statuses (wrapping dist.all_gather) raises a RuntimeError if launcher or any agent fails to respond. This should crash all agents.
    • The Launcher raises the WorkerException or WorkerKilledError, and raises an AgentKilledError if it catches a RuntimeError from sync_agent_statuses.
  • I think having both WorkerException and WorkerKilledError is confusing. Maybe ExceptionInWorker (not this but similar)? And maybe we can rename to AgentFailedError and WorkerFailedError.
  • Can we more closely wrap the RuntimeError as an AgentFailedError for clarity?

@apoorvkh
Copy link
Owner Author

unrelated, but let's also make a note that dist_mp.start_processes copies environment variables into the worker

@apoorvkh apoorvkh requested a review from pmcurtin October 27, 2024 18:59
@apoorvkh
Copy link
Owner Author

I tried to address above all comments, please review @pmcurtin ! We can document further in #73

Copy link
Collaborator

@pmcurtin pmcurtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@pmcurtin pmcurtin merged commit e31f967 into main Oct 27, 2024
28 checks passed
@pmcurtin pmcurtin deleted the worker-killed-error branch October 27, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants