Repository navigation
Conversation
|
@claude review always |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b1059589b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [ -f release-lock.json ]; then | ||
| ref=$(python3 -c "import json; print(json.load(open('release-lock.json'))['sglang_commit'])") | ||
| else | ||
| ref=sglang-miles |
There was a problem hiding this comment.
Honor the PR's SGLang override
When a coordinated Miles/SGLang change declares ci-sglang-pr: in the PR body, the existing CPU and CUDA workflows resolve that override before the release lock or branch default, but this new workflow always chooses only release-lock.json or sglang-miles. The wheel check therefore tests a different SGLang tree from the rest of CI and can either block a valid coordinated change or pass against code the PR does not target; reuse the canonical dependency-ref resolution here. .claude/rules/single-source-of-truth.mdL5-L6
Useful? React with 👍 / 👎.
8768466 to
453b573
Compare
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
@claude review |
…hout Megatron The wheel was tagged per interpreter and platform (cp312-cp312-manylinux1_x86_64) although Miles has no compiled code in it, so it is now a single py3-none-any wheel. The fixed chat templates that tito_tokenizer reads from next to the module were missing from the wheel, and the sdist could not build because it lacked requirements.txt; both now ship. The torchtitan extra installs the 0.3.0 release the Docker image pins by commit, with the torch>=2.13 floor validate_torchtitan_args already enforces at runtime. The wheel-smoke workflow installs the built wheel into a clean environment and runs tests/ci/wheel_smoke.py, which blocks Megatron, mbridge, TransformerEngine and apex on import, loads train.py and train_async.py, imports both backend actors and parses arguments for each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wheel-smoke picked only release-lock.json or sglang-miles, so a PR pairing with an SGLang PR through ci-sglang-pr: would smoke against the wrong tree. The resolution block the CPU and CUDA jobs carried as identical inline copies is now the resolve-dependency-refs action, and all three jobs use it. wheel_smoke.py now hides Megatron by setting sys.modules entries to None instead of a raising meta-path finder, so importlib.util.find_spec probes return None as they would for a package that is really absent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub loads a local action from the checked-out tree, and the reusable CI workflows check out inputs.ref, which can predate the action: /rerun-test on an older PR head, or release CI on an existing release branch. Both now check out .github/actions at github.sha, the commit the workflow runs from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reasons they carried are in the PR description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he workflow's commit wheel_smoke imported the drivers and actors, but the default rollout function and the session server are loaded by name at run time. install-megatron-bridge had the same old-ref problem as resolve-dependency-refs. Found by an adversarial review of this PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| MEGATRON_ONLY = ("megatron", "mbridge", "transformer_engine", "apex") | ||
| BACKENDS = ("fsdp", "torchtitan") | ||
| # loaded by name at run time, so importing the drivers does not reach them | ||
| RUNTIME_MODULES = ("miles.rollout.sglang_rollout", "miles.rollout.session.server") |
There was a problem hiding this comment.
cc cmt
[P2] RUNTIME_MODULES checks the legacy rollout, not the default one. miles.rollout.sglang_rollout is selected only when MILES_USE_LEGACY_ROLLOUT_V1=1 (resolve_rollout_function_paths in miles/utils/arguments.py). The default is InferenceRolloutFn, which imports inference_rollout_train inside _call_train and inference_rollout_eval inside _call_eval, so this smoke never imports either module. Nothing on that path imports Megatron at import time today, so this is a missing guard rather than a current crash. Impact: if a Megatron-only import lands in the default train or eval rollout path, wheel-smoke stays green and a wheel install fails at its first rollout. It also contradicts the PR body, which says the smoke covers "the default rollout function".
Suggested fix:
RUNTIME_MODULES = (
"miles.rollout.inference_rollout.inference_rollout_train",
"miles.rollout.inference_rollout.inference_rollout_eval",
"miles.rollout.session.server",
)Keep miles.rollout.sglang_rollout too if the legacy v1 path should stay covered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
319eb84 to
e6ded55
Compare
guapisolo
left a comment
There was a problem hiding this comment.
cc cmt
Approving #4308 at e6ded55. The review ran at 319eb84; the rebase onto main keeps those five commits unchanged, and the new commit raises python_requires to 3.11.
- [P2] Still open, not blocking:
tests/ci/wheel_smoke.pyimports the legacymiles.rollout.sglang_rolloutrather than the defaultinference_rollout_train/inference_rollout_eval, so a Megatron-only import added to the default rollout path would keepwheel-smokegreen and fail a wheel install at its first rollout. Nothing on that path imports Megatron today. Details and a 3-line fix: #4308 (comment). It can land here or in a follow-up.
Verification: read-only review of this increment at 319eb84 (native review, a Codex cross-harness review, a code-quality check), a range-diff to this head, and a read of the new commit; wheel-smoke is green at this head. Not covered: training from the wheel alone.
Stack (merge in order): #4308 → #4315 → #4316 → #4311 (needs radixark/miles-wheels#4).
First step toward
pip install milesfor the FSDP and torchtitan backends, without Megatron.Changes
bdist_wheelthat tagged a pure-Python packagecp3X-cp3X-manylinux*; it now builds onepy3-none-anywheel.templates/*.jinja, read from beside the module) go inpackage_data.MANIFEST.inaddsrequirements.txt, without which the sdist could not build.torchtitanextra.torchtitan==0.3.0(the commit the image pins) plustorch>=2.13, which 0.3.0 needs but does not declare.wheel-smokeworkflow +tests/ci/wheel_smoke.py: build the sdist and wheel, installwheel[torchtitan]into a clean venv, hide Megatron / mbridge / TransformerEngine / apex, then importtrain.py,train_async.py, both backend actors, and the modules loaded by name at run time (the default rollout function, the session server), and parse their args..github/actions/resolve-dependency-refs. The CPU and CUDA workflows carried identical inline copies of theci-sglang-pr:/release-lock.json/ branch-default resolution. All three jobs now share one action. Both local actions (this one andinstall-megatron-bridge) load fromgithub.shaso/rerun-teston an older PR head and release CI on an existing branch still find it.Testing
wheel-smokepasses on GitHub-hosted Linux (torch 2.14.1). Negative checks: a plantedimport megatron.corefails it, and so does running from inside the checkout.Not in this PR
onnxscript,nvidia-resiliency-ext,torchft-nightly) to an extra; that touches every Dockerfile and the image fingerprint.🤖 Generated with Claude Code