Skip to content

refactor(config): bound recipe composition - #30

Draft
leviking98z-rgb wants to merge 2 commits into
refactor/diffusion-runnerfrom
refactor/bounded-recipe-composition
Draft

refactor(config): bound recipe composition#30
leviking98z-rgb wants to merge 2 commits into
refactor/diffusion-runnerfrom
refactor/bounded-recipe-composition

Conversation

@leviking98z-rgb

Copy link
Copy Markdown
Owner

Summary

  • Replace copied full-tree YAML in 110 public recipes with one bounded layer of 19 family/workflow bases under examples/_base/; all 120 existing --config-name entry paths remain unchanged.
  • Keep experiment-defining algorithm, engine, topology, model, and data overrides in each public entry. A public entry may select one base followed by _self_; bases cannot inherit.
  • Add a pre-commit guard that validates this graph and asks Hydra to compose every public entry.
  • Update contributor/config documentation for the bounded composition rule.

This reduces recipe YAML from 22,813 to 15,129 lines. Including the guard and documentation, the PR is 2,413 insertions and 9,942 deletions (net -7,529 lines).

This is stacked on refactor/diffusion-runner (#29 in this fork), not on main.

Related Issue

N/A

Test Plan

  • pre-commit run --all-files — passed, including all architecture/framework/experimental guards, target resolution, YAML validation, and the new 120-entry composition guard.
  • python -m compileall -q lint unirl — passed.
  • python lint/check_recipe_targets.py — 1,154 recipe _target_ paths resolve.
  • python lint/check_architecture_boundaries.py — 475 files / 4,273 internal import edges satisfy all eight boundaries.
  • python lint/check_framework_contracts.py — passed.
  • One-off Hydra 1.3.2 parity harness composed every public config from the parent commit and this commit and compared OmegaConf.to_container(..., resolve=False) recursively — 120/120 exact structural matches.
  • Not run: GPU training or rollout smoke. This PR changes recipe source composition only; the composed configs are structurally identical.

Compatibility / Risk

  • Supported public recipe paths, CLI overrides, _target_ values, checkpoints, datasets, and runtime math are unchanged.
  • Tools that read a public YAML file directly with a generic YAML parser will now see only local overrides; they must compose it with Hydra to obtain the effective config. Hydra entrypoints and launchers already do this.
  • examples/_base/ paths are private implementation details and are not supported experiment entrypoints.
  • The graph is intentionally restricted to one base per public entry. This avoids deep inheritance and makes override order explicit.

Reviewer Notes

Checklist

  • I reviewed the changed code and removed unrelated/generated artifacts.
  • I updated tests, docs, and configs where needed, or explained why not.

@leviking98z-rgb
leviking98z-rgb force-pushed the refactor/bounded-recipe-composition branch from 56c9bf7 to 86d9673 Compare August 2, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant