-
Notifications
You must be signed in to change notification settings - Fork 20
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
MonitoredQueue: fail fast when subprocess exits #99
base: main
Are you sure you want to change the base?
Conversation
9bc6269
to
9abc936
Compare
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!
@@ -573,8 +553,8 @@ class _BabyWork(Work): | |||
def __init__( | |||
self, | |||
pg: "ProcessGroupBaby", | |||
tx: mp.Queue, | |||
rx: mp.Queue, | |||
tx: _MonitoredQueue, |
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.
What are tx
and rx
meant to represent?
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.
These are the raw communication channels with the subprocess, might be good to refactor these so all queue comms go through the PG
@@ -739,7 +739,7 @@ def _worker( | |||
try: | |||
pg = cls._create_pg(store, rank, world_size) | |||
except Exception as e: | |||
logger.exception(f"got exception in worker: {e}") | |||
print(f"got exception in worker: {e}", file=sys.stderr) |
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.
any particular reason for the logger -> print change?
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.
We're not initializing the logger in the subprocess so switched to stderr to make sure we actually log these
Maybe I should just instantiate a second logger as well
This is a wrapper around mp.Queue that fails fast when the subprocess exits. This means if subprocess BabyNCCL crashes we will report the error quickly rather than waiting for the timeout to elapse.
Test plan: