Skip to content

Package miles_megatron_plugins with Megatron Core - #49

Merged
Shi-Dong merged 1 commit into
radixark:miles-mainfrom
maocheng23:fix/miles-megatron-plugins-packaging
May 30, 2026
Merged

Package miles_megatron_plugins with Megatron Core#49
Shi-Dong merged 1 commit into
radixark:miles-mainfrom
maocheng23:fix/miles-megatron-plugins-packaging

Conversation

@maocheng23

Copy link
Copy Markdown

Summary

  • include miles_megatron_plugins in Megatron-LM setuptools package discovery
  • classify miles_megatron_plugins as first-party for isort

Why

miles-main imports miles_megatron_plugins.true_on_policy from Megatron Core, but pip install -e . only exposed megatron.core*. This means fresh CI environments can fail with ModuleNotFoundError: No module named 'miles_megatron_plugins' even though the source directory exists in the Megatron-LM checkout.

This keeps the true-on-policy plugin owned by Megatron-LM instead of vendoring it into radixark/miles. Related: radixark/miles#1259.

Verification

Ran a setuptools namespace discovery check from the repo root and confirmed the package set includes:

  • megatron.core
  • megatron.core.transformer
  • miles_megatron_plugins
  • miles_megatron_plugins.true_on_policy

Also ran git diff --check.

@Shi-Dong
Shi-Dong merged commit 3a60706 into radixark:miles-main May 30, 2026
Shi-Dong added a commit that referenced this pull request May 30, 2026
Builds on PR #49 (miles_megatron_plugins packaged with megatron-core). Widen the find list to every megatron.* subpackage and enable namespace packages so an editable install exposes megatron.training/legacy/rl without a PYTHONPATH override, while preserving the miles_megatron_plugins entries PR #49 added.
fzyzcjy added a commit that referenced this pull request Jun 5, 2026
…ixes)

Brings in: true-on-policy init (mappings.py _tree_all_reduce_sum +
_DeterministicReduceFromModelParallelRegion, miles_megatron_plugins/true_on_policy,
gpt_layer_specs use_true_on_policy_backend) + plugin packaging (#49, #50) + fixes
(param dtype before DDP wrap #24, attention_output_gate TP slice #22, fp32 shard
detach).
yueming-yuan pushed a commit that referenced this pull request Jun 24, 2026
…#50)

Broaden setuptools packages.find to `megatron*` (namespaces=true) plus
miles_megatron_plugins so `pip install -e .` exposes the plugin and every
megatron.* subpackage the miles runner imports transitively. Also add
miles_megatron_plugins to isort known_first_party.
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.

2 participants