Skip to content

fix(planner): unify simulation defaults with PlannerConfig - #15678

Merged
tedzhouhk merged 8 commits into
mainfrom
hzhou-codex/unify-planner-simulation-config
Oct 7, 2026
Merged

tedzhouhk merged 8 commits into
mainfrom
hzhou-codex/unify-planner-simulation-config

Conversation

@tedzhouhk

@tedzhouhk tedzhouhk commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A minimal planner: {policy: enabled} prediction was rejected before the production Planner could normalize its default throughput target to load-only scaling. Default recommendation presets also failed when some options were incompatible, and inactive null intervals could not reach the runtime safely.

  • Resolve concrete predictions and sweep candidates through the production PlannerConfig, removing the duplicate prediction model. Share concrete preset defaults and keep essential predictor/sampling validation in the canonical model.
  • Filter default and independent search domains by target/SLA, preserve explicit compatible subsets, and include only relevant FPM/load dimensions. Reject incompatible explicit policy lists and skip invalid recombinations as infeasible candidates.
  • Resolve inactive null intervals to production defaults and export effective settings. Preserve the sweep's runtime GPU floor as concrete planner.min_num_gpus so exported configurations round-trip without changing Planner limits.
  • Update Dynamo replay, sweep, and CLI reference documentation. Companion AISimulate user-guide update: docs: align Planner simulation defaults and search rulesย aisimulate#388 (merge after this implementation).

Addresses UAT-067 and UAT-068 only in AIC-2023. Other findings in that aggregate ticket remain separate.

Validation

  • 1,064 passed: Planner unit suite plus replay simulation/unit integration suites.
  • CPU unified CLI end-to-end suite passed. The retained default-goodput recommendation-to-prediction case was rechecked after the review cleanup: 1 passed, 18 deselected. Provider-level throughput/default/subset round-trip coverage remains; the full provider suite was rechecked: 52 passed.
  • Two additional 200-request native replays with inactive null intervals: both completed all requests and executed a Planner tick at 5,000 ms; throughput-only replay installed its FPM bootstrap.
  • Independent agent review: 86 configuration/round-trip cases passed and two invalid combinations produced InfeasibleCandidate; validated review findings fixed and rechecked.
  • Pre-commit and changed-page docs lint passed. fern check has the same 26 missing generated API-page errors as the unmodified base; fern docs broken-links cannot initialize because the same generated API index is missing on both.

Tests use task-local Python 3.12 and the pinned AISimulate 0.13.0.dev202609300000000061. Native replay uses the existing local UAT build; the relevant replay/mocker Rust sources are unchanged from its base to this PR base. No GPU or Kubernetes run was performed.

Summary by CodeRabbit

  • New Features
    • Planner recommendations now use consistent defaults for prediction settings, sampling, scaling sensitivity, and GPU limits. Generated recommendations retain their resolved settings when used for prediction.
    • Planner search options are filtered by optimization target and available SLA thresholds. Sampling and load-sensitivity options are included only when relevant scaling modes are enabled.
  • Improvements
    • Configuration validation now rejects unsupported predictors and out-of-range or nonpositive values.
    • Omitted adjustment intervals use Planner defaults; enabled scaling modes require concrete intervals.
  • Documentation
    • DynoSim guides now explain Planner defaults, search behavior, and interval requirements.

Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack โ†’

No actionable comments were generated in the recent review. ๐ŸŽ‰

โ„น๏ธ Recent review info
โš™๏ธ Run configuration
  • Configuration used: Repository: ai-dynamo/dynamo/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: c509f90b-21cb-429f-99c5-01f29869bc80
๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between b99152d and 3ec94cd.

๐Ÿ“’ Files selected for processing (12)
  • components/src/dynamo/planner/config/planner_config.py
  • components/src/dynamo/planner/simulation/config.py
  • components/src/dynamo/planner/simulation/load_predictor.py
  • components/src/dynamo/planner/simulation/presets.py
  • components/src/dynamo/planner/simulation/provider.py
  • components/src/dynamo/planner/tests/unit/test_planner_config.py
  • components/src/dynamo/planner/tests/unit/test_planner_sweep_config_provider.py
  • components/src/dynamo/replay/tests/e2e/configs/unified_cli/predict/dynamo/03-synthetic-default-planner.yaml
  • components/src/dynamo/replay/tests/e2e/test_unified_cli_dynamo.py
  • docs/fern/pages/cli/operations/simulation-with-dynosim/dynosim-sweeps.mdx
  • docs/fern/pages/kubernetes/operations/simulation-with-dynosim/dynosim-planner-replay.mdx
  • docs/fern/pages/reference/components/dynosim-replay-cli-reference.mdx

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

Planner configuration now supplies validated defaults used by prediction, recommendation search, and replay materialization. Recommendation candidates are filtered by target and scaling policy. Tests and documentation cover the updated configuration and CLI behavior.

Changes

Planner configuration flow

Layer / File(s) Summary
Planner contract and defaults
components/src/dynamo/planner/config/planner_config.py, components/src/dynamo/planner/simulation/config.py, components/src/dynamo/planner/simulation/load_predictor.py, components/src/dynamo/planner/simulation/presets.py, components/src/dynamo/planner/simulation/provider.py, components/src/dynamo/planner/tests/unit/test_planner_config.py
PlannerConfig validates predictor and scaling values. Simulation configuration and presets use PlannerConfig defaults for predictor, sampling, sensitivity, and recommendation fields.
Recommendation search and candidates
components/src/dynamo/planner/simulation/provider.py, components/src/dynamo/planner/tests/unit/test_planner_sweep_config_provider.py, docs/fern/pages/cli/operations/simulation-with-dynosim/dynosim-sweeps.mdx
Recommendation search filters scaling policies and related dimensions by target and retained policies. Candidate materialization wraps replay validation failures as infeasible candidates. Tests and the sweep guide describe search filtering and recommendation behavior.
Prediction and replay resolution
components/src/dynamo/planner/simulation/provider.py, components/src/dynamo/planner/tests/unit/test_planner_sweep_config_provider.py, components/src/dynamo/replay/tests/e2e/configs/unified_cli/predict/dynamo/03-synthetic-default-planner.yaml, components/src/dynamo/replay/tests/e2e/test_unified_cli_dynamo.py, docs/fern/pages/kubernetes/operations/simulation-with-dynosim/dynosim-planner-replay.mdx, docs/fern/pages/reference/components/dynosim-replay-cli-reference.mdx
Prediction and replay configuration resolve public fields through PlannerConfig. Active scaling modes require concrete intervals, and throughput scaling requires both SLA metrics for SLA targets. Unit tests, CLI cases, and reference pages cover the resolved settings.

Priority: โž– Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: โšช Minimal ยท up to 3ec94

The change unifies simulation defaults with the production Planner configuration and adds validation, tests and documentation. No concrete merge-blocking issue was identified in the supplied context.

๐Ÿšฅ Pre-merge checks | โœ… 4 | โŒ 1

โŒ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage โš ๏ธ Warning Docstring coverage is 6.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 8 files. (4 skipped: 4โ€ฆ Write docstrings for the functions missing them to satisfy the coverage threshold.
โœ… Passed checks (4 passed)
Check name Status Explanation
Linked Issues check โœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check โœ… Passed Check skipped because no linked issues were found for this pull request.
Title check โœ… Passed The title clearly and concisely describes the main change: unifying simulation defaults with PlannerConfig.
Description check โœ… Passed The description gives a detailed overview, change summary, related issue, and validation results. It does not use the templateโ€™s section headings or identify where the reviewer should start, and its Rโ€ฆ
Full details: Docstring Coverage

Explanation

Docstring coverage is 6.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 8 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
  • Autopilot ยท Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
@tedzhouhk
tedzhouhk enabled auto-merge (squash) October 5, 2026 22:47

@dynamo-review-agent dynamo-review-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously reported defects still present:

  • Original discussion: Still present: _public_planner_config filters exported public fields with planner_config.get(runtime) is not None, so valid falsy runtime values such as min_endpoint: 0 are omitted from the recommendation-to-prediction round trip.
  • Original discussion: Still present: the explicit default scaling-flags parameter remains in test_prediction_defaults_and_inactive_nulls_match_real_planner, duplicating the empty-overrides coverage rather than protecting distinct behavior.
  • Original discussion: The explicit default scaling-flags parameter in test_prediction_defaults_and_inactive_nulls_match_real_planner is still present. It exercises the same effective PlannerConfig normalization as the empty-overrides case because non-SLA prediction targets force load scaling, so it cannot distinguish ignored explicit defaults from default handling.

@devin-ai-integration

devin-ai-integration Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

โน๏ธ Dynamo PR CI cancelled โ€” run 37529060170 (attempt 2) on cbd17ff49e

Gate checks: โŒ backend-status-check ยท โœ… deploy-status-check ยท โŒ dynamo-status-check

Other Jobs
dynamo-runtime โน๏ธ 1
frontend โน๏ธ 1
planner โน๏ธ 1
triton-runtime โน๏ธ 1

Failure details

No job failed outright: all 4 cancelled jobs are multi-arch image builds that hit the job timeout-minutes limit during Build and Push Image (GitHub reports this as cancelled). They were not fail-fast or manual cancels; the gate checks fail only because of them.

โฐ dynamo-runtime / image / Build multi-arch cuda13.0: exceeded max execution time of 1h0m0s

Job: dynamo-runtime / image / Build multi-arch cuda13.0 ยท Step: Build and Push Image ยท Logs: gh api repos/ai-dynamo/dynamo/actions/jobs/112523306734/logs

##[error]The job has exceeded the maximum execution time of 1h0m0s
##[error]The operation was canceled.

Timed out after 60 min while the multi-arch buildkit build was still running (last amd64 output: wheel_builder 11/11 kvbm NOTICES step done). No build error in the log.

โฐ planner / Build multi-arch cpu: exceeded max execution time of 1h0m0s

Job: planner / Build multi-arch cpu ยท Step: Build and Push Image ยท Logs: gh api repos/ai-dynamo/dynamo/actions/jobs/112523305968/logs

##[error]The job has exceeded the maximum execution time of 1h0m0s
##[error]The operation was canceled.

Timed out after 60 min mid-build (last amd64 output: runtime_wheel_builder 11/15 rust license harvest). No build error in the log.

โฐ triton-runtime / Build multi-arch cpu: exceeded max execution time of 1h0m0s

Job: triton-runtime / Build multi-arch cpu ยท Step: Build and Push Image ยท Logs: gh api repos/ai-dynamo/dynamo/actions/jobs/112523306056/logs

##[error]The job has exceeded the maximum execution time of 1h0m0s
##[error]The operation was canceled.

Timed out after 60 min mid-build (last output: runtime_wheel_builder 7/13 COPY steps). No build error in the log.

โฐ frontend / Build multi-arch cpu: exceeded max execution time of 1h30m0s

Job: frontend / Build multi-arch cpu ยท Step: Build and Push Image ยท Logs: gh api repos/ai-dynamo/dynamo/actions/jobs/112523305858/logs

##[error]The job has exceeded the maximum execution time of 1h30m0s
##[error]The operation was canceled.

Timed out after 90 min mid-build (last amd64 output: pre_frontend 21/22 done). No build error in the log.

All four builds ran slowly and timed out at about the same time, with no error in the build output. That points to slow builds or runners, not a code failure. A rerun of failed jobs is likely enough.

For agents
{"pr": 15678, "run_id": 37529060170, "run_attempt": 2, "head_sha": "cbd17ff49e0f5c3ee4ce5a83b5ab2ac3716217d1",
 "failures": [
  {"job": "dynamo-runtime / image / Build multi-arch cuda13.0", "job_id": 112523306734, "failed_step": "Build and Push Image", "signature": "job timeout 1h0m0s (cancelled)", "tests": [], "log_cmd": "gh api repos/ai-dynamo/dynamo/actions/jobs/112523306734/logs"},
  {"job": "planner / Build multi-arch cpu", "job_id": 112523305968, "failed_step": "Build and Push Image", "signature": "job timeout 1h0m0s (cancelled)", "tests": [], "log_cmd": "gh api repos/ai-dynamo/dynamo/actions/jobs/112523305968/logs"},
  {"job": "triton-runtime / Build multi-arch cpu", "job_id": 112523306056, "failed_step": "Build and Push Image", "signature": "job timeout 1h0m0s (cancelled)", "tests": [], "log_cmd": "gh api repos/ai-dynamo/dynamo/actions/jobs/112523306056/logs"},
  {"job": "frontend / Build multi-arch cpu", "job_id": 112523305858, "failed_step": "Build and Push Image", "signature": "job timeout 1h30m0s (cancelled)", "tests": [], "log_cmd": "gh api repos/ai-dynamo/dynamo/actions/jobs/112523305858/logs"}
 ]}

Posted automatically by Devin for run 37529060170. Updated on every full-CI run of this PR.

โ€ฆnner-simulation-config

Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
Signed-off-by: hongkuanz <hongkuanz@nvidia.com>

@dynamo-review-agent dynamo-review-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously reported defects still present:

  • Original discussion: The Prometheus-environment isolation problem remains on the concrete prediction/materialization path: _planner_config_payload still constructs a full PlannerConfig, but only neutralizes metric_pulling_prometheus_extra_query_params. Other environment-derived fields such as PROMETHEUS_CA_BUNDLE are still read and validated even though the returned hook payload excludes those connection credentials, so a supported simulation prediction or recommendation can still fail because of stale local Prometheus environment. Pass neutral values for the excluded Prometheus connection fields, or otherwise validate only the adapter-owned fields needed for the exported planner_config.

Signed-off-by: hongkuanz <hongkuanz@nvidia.com>
@tedzhouhk
tedzhouhk merged commit ac2968b into main Oct 7, 2026
248 of 260 checks passed
@tedzhouhk
tedzhouhk deleted the hzhou-codex/unify-planner-simulation-config branch October 7, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation fix planner size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants