Conversation
coketaste
requested review from
Cemberk,
Rohan138,
gargrahul and
leconcio
as code owners
May 3, 2026 15:24
Collaborator
Author
|
Merged current What landed in the merge besides conflict resolution:
|
Collaborator
Author
|
Pushed
|
Accept a YAML file and Hydra group or key=value overrides on run and build, then translate them into the same additional_context dict the existing engine already consumes. --config is mutually exclusive with --additional-context so current JSON and CLI paths stay unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit tests for Hydra compose, validation, key mapping, and a golden parity check that YAML produces the same context keys as JSON additional_context. Co-authored-by: Cursor <cursoragent@cursor.com>
Describe --config as the same additional_context contract in YAML form, not a separate Hydra-native schema, and add runnable demo and template job files. Co-authored-by: Cursor <cursoragent@cursor.com>
coketaste
force-pushed
the
coketaste/v2-config-driven
branch
from
September 18, 2026 15:09
1ba44c0 to
12b248f
Compare
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
Adds
--configas a composable, Hydra-based YAML alternative to--additional-contextJSON strings, available on bothrunandbuild.src/madengine/config/module —HydraConfigLoader(Compose API),ConfigTranslator(YAML → internal context key mapping),ConfigValidator(cross-field checks)src/madengine/configs/— default groups (platform,scheduler,hardware,launcher) and append-only groups (+profile,+env,+tools,+data,+build)--configcannot be combined with--additional-context/--additional-context-fileexamples/configs/— annotated templates (local.yaml,slurm.yaml,k8s.yaml) plus ready-to-run demos underdemo/local/,demo/slurm/,demo/k8s/dummy_torchrun/dummy_torchrun_multin_gpuscorrected from"1"to"4"so local multi-GPU demos show 1N×4G topologyRebase onto develop
Merged current
developinto this branch and resolved conflicts (pinned image digests,slurm_multi, timeout0, launcher aliases, K8s mixin split, hatchartifactspackaging). Hydraconfigs/are included in the wheel via hatch artifacts alongsidescripts/.Post-merge
--configupdates:--config key=valueoverrides now win over a user YAML file (previously YAML was merged last and silently overwrote them)live_output,output,summary_output,data_config,model.skip_run, andmodel.timeout(including0)require_pinned_imageand treatskubernetesas an alias ofk8sfor slurm conflict checksmegatron→megatron-lm,slurm_multigroup, SLURMreservation/skip_gpus_directivein the slurm scheduler presetBehaviour
Config group overrides:
Append-only groups:
User YAML file, then inline overrides (inline wins):
When a user YAML sets a distributed launcher,
distributed.enabled: truemust also be set explicitly — the defaultlauncher: nonegroup setsenabled: falseand setting a launcher key alone does not override it.Test plan
pytest tests/unit(789 passed after merge)pytest tests/unit/test_config_schema.py tests/unit/test_config_translator.py tests/unit/test_config_integration.py tests/unit/test_hydra_config_loader.py tests/unit/test_cli.pymadengine run --config examples/configs/demo/local/single-gpu.yamlcompletes and writesperf.csvmadengine run --config examples/configs/demo/local/multi-gpu-torchrun.yamlshows 1N×4G topology and torchrun in the launcher columnmadengine run --config my_job.yaml --additional-context '{}'exits withINVALID_ARGS(exit code 4)pre-commit run --all-filespasses