Skip to content

fix(weight-sync): load optional P2P dependencies lazily - #2

Closed
nanjiangwill wants to merge 1 commit into
modal-projects:mainfrom
nanjiangwill:fix/lazy-weight-sync-imports
Closed

fix(weight-sync): load optional P2P dependencies lazily#2
nanjiangwill wants to merge 1 commit into
modal-projects:mainfrom
nanjiangwill:fix/lazy-weight-sync-imports

Conversation

@nanjiangwill

Copy link
Copy Markdown
Collaborator

Summary

  • defer importing the P2P weight updater until P2P transfer is selected
  • keep broadcast, disk-delta, and colocated runs independent of Mooncake RDMA library compatibility

Root cause

The Megatron actor imported the P2P updater at module load time. That transitively imported Mooncake and loaded its native RDMA libraries even when another weight-transfer mode was configured.

Validation

  • python -m py_compile miles/backends/megatron_utils/actor.py
  • ruff check miles/backends/megatron_utils/actor.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant