Repository navigation
refactor(data): reuse Primus config merge and isolate Megatron CLI - #1065
Merged
Merged
Conversation
`primus data diffusion-encoded` inferred which CLI flags were explicitly provided by comparing each parsed value against a default table, so a flag typed with a value equal to its default was indistinguishable from an omitted flag and silently lost to the YAML config. The same comparison dropped keys supplied by neither the YAML nor the CLI from the merged namespace, so _prepare_encoded raised AttributeError on args.variable_size whenever the optional image: section was absent. Register the encoded parser's options with argparse.SUPPRESS so the namespace holds only what the user typed, and merge defaults -> YAML -> CLI in priority order. The defaults layer always supplies every configurable key, which makes the missing-attribute failure impossible by construction. diffusion-raw and diffusion-ingest keep their argparse defaults and are unaffected. Fixes #1001
WangLingxun
force-pushed
the
refactor/data-config-pipeline
branch
from
September 1, 2026 06:42
5b3654b to
1376688
Compare
WangLingxun
marked this pull request as ready for review
September 1, 2026 06:42
WangLingxun
requested review from
Xiaoming-AMD,
limou102 and
wenxie-amd
as code owners
September 1, 2026 06:42
…pipeline # Conflicts: # primus/cli/subcommands/data.py # tests/unit_tests/cli/test_data_config.py
Xiaoming-AMD
approved these changes
Sep 1, 2026
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
primus data diffusion-raw,diffusion-encoded, anddiffusion-ingestcompatible through a thin CLI facadeRelationship to #1002
#1002 has been merged into
mainasda87fdf5and fixes #1001.This branch merged the latest
mainineeb4e00eto resolve the overlap without rebasing or rewriting any existing commit. The historicalf44a5bdecommit carries the same #1002 patch and contributes no unique diff relative to the current base.The effective review scope of this PR is the following two refactor commits:
bf720f15 refactor(data): centralize preprocessing config resolution13766887 refactor(cli): move data commands into megatron backendValidation
maincontains only the expected data and CLI refactor filesquickstart_pokemon.yamlresolution was validated