-
Notifications
You must be signed in to change notification settings - Fork 76
fix: force ps to quit when error occur during updating #43
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
fix: force ps to quit when error occur during updating #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements error handling and recovery mechanisms for distributed weight updates in the checkpoint engine. The changes add support for detecting and handling remote errors during weight updates, ensuring proper cleanup even when errors occur.
Key changes:
- Added error handling in worker processes to send exceptions back through ZMQ sockets
- Modified the parameter server to detect remote errors via non-empty responses and coordinate error recovery using all-reduce
- Moved process group cleanup and cache clearing into a finally block to ensure proper resource cleanup on both success and failure paths
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| checkpoint_engine/worker.py | Wrapped weight update execution in try-except to send exceptions back via ZMQ socket |
| checkpoint_engine/ps.py | Added error detection via response checking, coordinated error handling with all-reduce, and moved cleanup to finally block |
| tests/test_update.py | Added comprehensive test infrastructure for error scenarios with new test cases and subprocess-based execution |
Comments suppressed due to low confidence (2)
tests/test_update.py:62
- Variable weights is not used.
weights = weights # Do some fake processing
tests/test_update.py:62
- This assignment assigns a variable to itself.
weights = weights # Do some fake processing
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0fd4fe7 to
39807ce
Compare
998fe93 to
61f1e72
Compare
1aeb3ce to
fe97f1e
Compare
|
LGTM |
1 similar comment
|
LGTM |
blahgeek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
resolve #38
send an Exception to PS when update_weights_from_ipc execute run failed. _update_per_bucket needs to ensure all processes not to get an Exception before continuing next updating iteration