Package miles_megatron_plugins with Megatron Core - #49
Merged
Shi-Dong merged 1 commit intoMay 30, 2026
Merged
Conversation
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.
This was referenced May 30, 2026
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.
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
miles_megatron_pluginsin Megatron-LM setuptools package discoverymiles_megatron_pluginsas first-party for isortWhy
miles-mainimportsmiles_megatron_plugins.true_on_policyfrom Megatron Core, butpip install -e .only exposedmegatron.core*. This means fresh CI environments can fail withModuleNotFoundError: 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.coremegatron.core.transformermiles_megatron_pluginsmiles_megatron_plugins.true_on_policyAlso ran
git diff --check.