Fix update-path crashes, stale P2P state, and NCCL RDMA parsing#91
Open
morluto wants to merge 5 commits into
Open
Fix update-path crashes, stale P2P state, and NCCL RDMA parsing#91morluto wants to merge 5 commits into
morluto wants to merge 5 commits into
Conversation
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.
Summary
This fixes several failure paths in checkpoint update plumbing that can cause crashes, leaked resources, or incorrect RDMA device selection.
What was wrong
load_metas()accepted empty owners, whilegather_metas()filters them out. An empty owner can later reach bucket generation and hit an assertion on a zero-sized bucket.P2PStore.register_named_tensors()updatedself.named_tensorsbeforebatch_register_memory()succeeded. If the engine registration failed, local state claimed tensors were registered even though the transfer engine rejected them.request_inference_to_update()created anhttpx.Clientfor every update request without closing it, leaving the client transport/connection pool alive longer than necessary.NCCL_IB_HCAparsing did not fully match NCCL:=^/^=should select no devices, matching NCCL behaviorWhat changed
load_metas()before storing global metadata.P2PStore.named_tensorsonly after transfer-engine registration succeeds.httpx.Clientas a context manager inrequest_inference_to_update().Review Notes
Suggested order:
checkpoint_engine/device_utils.py+tests/test_rdma_parser.pycheckpoint_engine/ps.py,checkpoint_engine/p2p_store.py,tests/test_p2p_store.pycheckpoint_engine/api.py+tests/test_api.pyCommits are split by area:
fix: align RDMA device parsing with NCCLfix: keep parameter metadata state consistentfix: close inference update HTTP clientTesting
Result:
Both passed.