Skip to content

refactor: expose shared recipe builders from components#2190

Draft
HuiyingLi wants to merge 2 commits intomainfrom
codex/refactor-component-builders
Draft

refactor: expose shared recipe builders from components#2190
HuiyingLi wants to merge 2 commits intomainfrom
codex/refactor-component-builders

Conversation

@HuiyingLi
Copy link
Copy Markdown
Contributor

@HuiyingLi HuiyingLi commented May 8, 2026

Summary

  • Move duplicated LLM/VLM builder helpers into component-level modules for checkpoint config, distributed setup, loss construction, optimizer construction, LR scheduler construction, step scheduler construction, and wandb setup.
  • Export the new public builder paths from the relevant components/*/__init__.py files.
  • Keep recipe-level backwards compatibility by importing the moved helpers into the existing recipe modules.
  • Update sibling recipes to consume the new component paths where applicable.
  • Update Dion optimizer branch tests to exercise the shared component optimizer builder directly.

Validation

  • uv run ruff format ... on touched code files
  • uv run ruff check ... on touched code files
  • Component builder import smoke check
  • Shared build_optimizer smoke check
  • python -m py_compile ... on touched Python modules
  • uv run pytest tests/unit_tests/optim/test_dion_optimizer_utils.py::TestBuildOptimizerDionBranch
  • git diff --check

Earlier focused recipe pytest collection was attempted, but this environment fails before test execution due to existing binary/import issues: missing torchvision::nms and a Transformer Engine undefined symbol.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 8, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: HuiyingLi <willwin.lee@gmail.com>
@HuiyingLi HuiyingLi force-pushed the codex/refactor-component-builders branch from e2846b9 to 70498e5 Compare May 8, 2026 08:22
Signed-off-by: HuiyingLi <willwin.lee@gmail.com>
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.

1 participant