-
Notifications
You must be signed in to change notification settings - Fork 28
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: resolve connection issues for aggregators on different nodes #615
base: main
Are you sure you want to change the base?
Conversation
This commit addresses the issue where aggregators failed to connect to the server when running on different nodes. The changes include updates to `shm.py` and `channel_manager.py` to improve compatibility and error handling for multi-node setups. ### Changes in shm.py: - Refactored `LIFLSharedMemoryBackend` to dynamically support configuration of `sockmap_server_ip` and `rpc_server_ip` for non-localhost setups. - Enhanced shared memory cleanup logic to handle scenarios where segments may already be unlinked by another process. - Improved `_rx_task` logging to provide clearer debugging information during message reception and processing. - Added safeguards to ensure graceful handling of unexpected messages and connection issues. ### Changes in channel_manager.py: - Modified `_setup_backends` to correctly configure distinct backends for each channel, ensuring multi-node communication is supported. - Added logging for missing backends to help diagnose misconfigurations in `config.json`. - Enhanced default backend assignment logic to avoid conflicts when channels lack explicitly defined backends. ### Impact: - Fixes aggregator connection failures when running across multiple nodes. - Improves resilience and debuggability of shared memory operations and backend setups. - Ensures channel management adapts dynamically to different configurations. This commit has been tested with coord_hier_syncfl_mnist
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.
Thank you for the PR. I left minor comments. please consider to address them.
|
||
logger.debug("channel leave completed gracefully") | ||
|
||
# def leave(self, channel) -> None: |
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.
can you please remove these commented lines?
|
||
if self._backend: | ||
_ = run_async(_inner(self._backend), self._backend.loop()) | ||
|
||
for k, v in self._backends.items(): | ||
_ = run_async(_inner(v), v.loop()) | ||
_ = run_async(_inner(v), v.loop()) |
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.
nit: please add a new line.
This commit addresses the issue where aggregators failed to connect to the server when running on different nodes. The changes include updates to
shm.py
andchannel_manager.py
to improve compatibility and error handling for multi-node setups.Changes in shm.py:
LIFLSharedMemoryBackend
to dynamically support configuration ofsockmap_server_ip
andrpc_server_ip
for non-localhost setups._rx_task
logging to provide clearer debugging information during message reception and processing.Changes in channel_manager.py:
_setup_backends
to correctly configure distinct backends for each channel, ensuring multi-node communication is supported.config.json
.Impact:
This commit has been tested with coord_hier_syncfl_mnist
Description
Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to
related issues, other PRs, or technical references.
Note that by not including a description, you are asking reviewers to do extra work to understand the context of this
change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.
Type of Change
Checklist