fix: resolve connection issues for aggregators on different nodes#615
Open
akwaed wants to merge 1 commit intocisco-open:mainfrom
Open
fix: resolve connection issues for aggregators on different nodes#615akwaed wants to merge 1 commit intocisco-open:mainfrom
akwaed wants to merge 1 commit intocisco-open:mainfrom
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
myungjin
reviewed
Dec 12, 2024
Contributor
myungjin
left a comment
There was a problem hiding this comment.
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: |
Contributor
There was a problem hiding this comment.
can you please remove these commented lines?
|
|
||
| for k, v in self._backends.items(): | ||
| _ = run_async(_inner(v), v.loop()) | ||
| _ = run_async(_inner(v), v.loop()) No newline at end of file |
Contributor
There was a problem hiding this comment.
nit: please add a new line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses the issue where aggregators failed to connect to the server when running on different nodes. The changes include updates to
shm.pyandchannel_manager.pyto improve compatibility and error handling for multi-node setups.Changes in shm.py:
LIFLSharedMemoryBackendto dynamically support configuration ofsockmap_server_ipandrpc_server_ipfor non-localhost setups._rx_tasklogging to provide clearer debugging information during message reception and processing.Changes in channel_manager.py:
_setup_backendsto 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