Repository navigation
feat(replay): replay DGDR trace Runs with common random numbers - #17733
Merged
Merged
Conversation
DynamoReplayRunner now replays every candidate of a trace sweep with _deterministic=True: ordinal request ids and the canonical router seed. Candidates of one trace then differ only by their configuration, so a candidate's score does not depend on the other candidates, the Run or the parallelism. Live planner retune compares candidates that different DGDR Runs of one window scored on that basis. The synthetic-workload path is unchanged. First layer of the live retune stack split from #17562. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
tedzhouhk
added a commit
that referenced
this pull request
Oct 30, 2026
Stacks this PR on #17736. The library layers of live retune now come from #17733 (CRN replay), #17734 (configuration and premises), #17735 (window cut and reconciler) and #17736 (DGDR executor), so this PR's diff against #17736 is the supervisor, state, actuator, metrics, the Planner wiring, Helm RBAC, docs and the end-to-end tests. #17734 also adds a replay check that rejects executor 'dgdr'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
1 task
Contributor
✅ Dynamo PR CI passed — run 41524032893 (attempt 1) on
|
jthomson04
reviewed
Oct 31, 2026
jthomson04
left a comment
Contributor
There was a problem hiding this comment.
Reviewed at e9ab6af. The change is fine: the canonical seed is the same for every candidate and window, no user seed is overridden, and the offline-only guard can't trip. Two nits inline.
Fold the trace replay determinism check into test_trace_runner_preserves_current_replay_arguments with an agg and a disagg row, and drop the separate test file. Cut the runner comment to the invariant, and update replay/api.py: _deterministic now applies to every trace replay through the Sweeper's Dynamo runner, not only to retune sweeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
sachalmalick
approved these changes
Nov 2, 2026
jthomson04
approved these changes
Nov 2, 2026
1 task
22 of 31 tasks
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.
Note
Stacked PR, live retune (split from #17562). Merge order: #17483 → #17733 (this PR) → #17734 → #17735 → #17736 → #17562
This PR targets
hzhou/dgdr-trace-pvc, the branch of #17483 (the PR below it), so its diff shows only this layer. #17562 was split into these layers for review. At the split they carried #17562's original diff exactly, plus a 40-line replay check in #17734 that rejectsexecutor: dgdrin offline replay; the review follow-up of 2026-11-02 has since changed several layers.Overview
Live planner retune (#17562) compares Candidates that different DGDR Runs of one window scored. That comparison only works if a Candidate's score depends on its own configuration and nothing else. This PR makes
DynamoReplayRunnerreplay every trace workload with common random numbers (CRN): ordinal request ids and the canonical router seed.DynamoReplayRunneris thedynamoreplay runner that AISimulate's Sweeper loads (entry point inpyproject.toml), and it is what a DGDR trace Run executes.run_trace_replayalready has the internal_deterministicoption for this; offline replay retune uses it for its baseline and candidates. This PR only passes it from the Sweeper runner. The synthetic-workload path is unchanged.This layer changes no file that #17483 touches. It sits on #17483 for merge order, because DGDR trace Runs (
spec.workload.trace) come from #17483.Key Changes
components/src/dynamo/replay/simulation.py: passes_deterministic=Trueto bothrun_trace_replaycalls ofDynamoReplayRunner(agg and disagg).run_synthetic_trace_replayhas no such parameter and does not receive it.components/src/dynamo/replay/api.py: comments only._deterministicis no longer described as internal to retune sweeps: every trace replay through the Sweeper'sdynamorunner sets it.components/src/dynamo/replay/tests/test_simulation.py: the existingtest_trace_runner_preserves_current_replay_argumentsnow runs for an agg and a disagg deployment, checks each one's worker counts, and asserts_deterministic is True.Behavior note: this applies to every trace replay through the Sweeper's
dynamorunner, including every DGDR trace Run, not only the Planner's. A Run's scores no longer depend on the other candidates or on the Run's parallelism.Validation
Ran on this layer (
e9ab6afc24, before the review follow-up) and compared with the same suites at the stack base6e8087d359(#17483's head, with mainc6b055d4c7merged in):replay/tests/test_simulation.py::test_trace_runner_preserves_current_replay_arguments(agg, disagg)92cee14c88), wheresimulation.pyandtest_simulation.pyare identical to this layer's head8e2df8215e. The rest of the file: 54 passed, and 2 failed on this host's missingconversation_affinity(see below).components/src/dynamo/planner/tests,components/src/dynamo/replay/tests, no xdist)e9ab6afc24: 59 failed, 2137 passed, 2 skipped. At the base: 59 failed, 2131 passed, 2 skipped. The two sets of failing tests are identical; the 6 extra passes were the tests of the earlier separate CRN test file, which the follow-up folded intotest_simulation.py. Not re-run per layer after the follow-up.pre-commit run --fileson the changed filese9ab6afc24, on its 2 changed files: all hooks pass, no files changed. After the follow-up,pre-commitfrom8d098bed48to92cee14c88(the top of the stack, covering every layer's follow-up) is clean.dynamo-pipeline.ymlcommand,MYPYPATH=components/src:lib/bindings/python/src mypy --explicit-package-bases) ondynamo/planneranddynamo/replaye9ab6afc24: 9 errors, the same 9 as at the base: missingyaml/pandas/nvtxstubs, plus existingarg-typeerrors incommon/http/url_validator.pyandplanner/simulation/provider.py. None is new.The 59 failures come from this host. Its prebuilt bindings lack
conversation_affinity(#16854) and theais-forward-passfeature, and it has noetcdbinary. CI builds the bindings from source.The development-cluster run in #17562 used a planner image with this change for its Run Jobs, on #17562's pre-split branch. Both windows of that run reached a decision (
kept,applied). The executor allows a decision only when the CRN probe's score matches the grid evaluation of the same point within a relative error of 1e-9. This layer was not run on a cluster by itself.Issues and Ongoing Work
Review follow-up (2026-11-02)
test_trace_runner_preserves_current_replay_arguments, with an agg and a disagg row, and removed the separate CRN test file.replay/api.pycomments:_deterministicnow applies to every trace replay through the Sweeper'sdynamorunner, not only to retune sweeps.Pull Request Checklist
/pr-checklistskill.🤖 Generated with Claude Code