Skip to content

Add FleetSim workload mixture evaluation - #2596

Open
haowu1234 wants to merge 2 commits into
vllm-project:mainfrom
haowu1234:codex/fleetsim-workload-mixtures
Open

Add FleetSim workload mixture evaluation#2596
haowu1234 wants to merge 2 commits into
vllm-project:mainfrom
haowu1234:codex/fleetsim-workload-mixtures

Conversation

@haowu1234

@haowu1234 haowu1234 commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #2556.

Adds FleetSim workload archetype mixture support for offline capacity experiments:

  • versioned workload mixture schema with fixed nominal and time-varying composition schedules
  • deterministic built-in fixtures for nominal, drift, and burst scenarios
  • mixture sampling and distribution validation for weights, CDF reproduction, and sampling drift
  • FleetOptimizer-based mixture evaluation with aggregate, nominal, archetype, schedule-window, and robust sizing cases
  • explicit infeasible diagnostics for SLO/resource violations
  • CLI/API/docs coverage while preserving existing single-CDF optimization workflows

Production routing/actuation paths are intentionally untouched; this is FleetSim/offline evaluation plumbing.

Validation

  • git diff --check
  • python3 -m pytest tests/test_workload_mixtures.py tests/test_workload_mixture_optimizer.py tests/test_optimizer.py::TestCLISubcommands::test_mixture_optimize tests/test_api.py::TestWorkloadRoutes::test_list_mixture_workloads_returns_three tests/test_api.py::TestJobRoutes::test_submit_mixture_optimize_missing_params_returns_422 tests/test_api.py::TestJobLifecycle::test_mixture_optimize_job_completes_and_has_result -q
  • make vllm-sr-sim-test
  • make agent-ci-gate CHANGED_FILES="src/fleet-sim/README.md,src/fleet-sim/data/README.md,src/fleet-sim/data/workload_mixture_burst.json,src/fleet-sim/data/workload_mixture_drift.json,src/fleet-sim/data/workload_mixture_nominal.json,src/fleet-sim/fleet_sim/api/models.py,src/fleet-sim/fleet_sim/api/routes/jobs.py,src/fleet-sim/fleet_sim/api/routes/workloads.py,src/fleet-sim/fleet_sim/api/runner.py,src/fleet-sim/fleet_sim/core/request.py,src/fleet-sim/fleet_sim/data/README.md,src/fleet-sim/fleet_sim/data/workload_mixture_burst.json,src/fleet-sim/fleet_sim/data/workload_mixture_drift.json,src/fleet-sim/fleet_sim/data/workload_mixture_nominal.json,src/fleet-sim/fleet_sim/optimizer/__init__.py,src/fleet-sim/fleet_sim/optimizer/mixture.py,src/fleet-sim/fleet_sim/optimizer/mixture_models.py,src/fleet-sim/fleet_sim/workload/__init__.py,src/fleet-sim/fleet_sim/workload/mixture.py,src/fleet-sim/fleet_sim/workload/mixture_sampling.py,src/fleet-sim/fleet_sim/workload/mixture_validation.py,src/fleet-sim/run_sim.py,src/fleet-sim/tests/test_api.py,src/fleet-sim/tests/test_optimizer.py,src/fleet-sim/tests/test_workload_mixture_optimizer.py,src/fleet-sim/tests/test_workload_mixtures.py"
  • clean remote clone of haowu1234:codex/fleetsim-workload-mixtures at 509738a74ba074aa0efe6006d60b67892f494007: make agent-ci-gate CHANGED_FILES="..."

@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 5dd0ee6
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/6a5ba1ad99f16d0008e48be9
😎 Deploy Preview https://deploy-preview-2596--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

✅ Supply Chain Security Report — All Clear

Scanner Status Findings
AST Codebase Scan (Py, Go, JS/TS, Rust) 29 finding(s) — MEDIUM: 22 · LOW: 7
AST PR Diff Scan No issues detected
Regex Fallback Scan No issues detected

Scanned at 2026-07-18T15:55:08.304Z · View full workflow logs

Signed-off-by: haowu1234 <13258260125@163.com>
@haowu1234
haowu1234 force-pushed the codex/fleetsim-workload-mixtures branch from 805f9ec to 509738a Compare July 18, 2026 12:28
@haowu1234
haowu1234 marked this pull request as ready for review July 18, 2026 13:45
@haowu1234
haowu1234 requested review from Xunzhuo and rootfs as code owners July 18, 2026 13:46
@github-actions

Copy link
Copy Markdown
Contributor

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned when their GitHub accounts are assignable in this repository:

📁 src/fleet-sim

Owners: @FAUST-BENCHOU, @shraderdm, @drivebyer, @ramkrishs, @WUKUNTAI-0211, @AayushSaini101, @siloteemu
Files changed:

  • src/fleet-sim/README.md
  • src/fleet-sim/data/README.md
  • src/fleet-sim/data/workload_mixture_burst.json
  • src/fleet-sim/data/workload_mixture_drift.json
  • src/fleet-sim/data/workload_mixture_nominal.json
  • src/fleet-sim/fleet_sim/api/models.py
  • src/fleet-sim/fleet_sim/api/routes/jobs.py
  • src/fleet-sim/fleet_sim/api/routes/workloads.py
  • src/fleet-sim/fleet_sim/api/runner.py
  • src/fleet-sim/fleet_sim/core/request.py
  • src/fleet-sim/fleet_sim/data/README.md
  • src/fleet-sim/fleet_sim/data/workload_mixture_burst.json
  • src/fleet-sim/fleet_sim/data/workload_mixture_drift.json
  • src/fleet-sim/fleet_sim/data/workload_mixture_nominal.json
  • src/fleet-sim/fleet_sim/optimizer/__init__.py
  • src/fleet-sim/fleet_sim/optimizer/mixture.py
  • src/fleet-sim/fleet_sim/optimizer/mixture_models.py
  • src/fleet-sim/fleet_sim/workload/__init__.py
  • src/fleet-sim/fleet_sim/workload/mixture.py
  • src/fleet-sim/fleet_sim/workload/mixture_sampling.py
  • src/fleet-sim/fleet_sim/workload/mixture_validation.py
  • src/fleet-sim/run_sim.py
  • src/fleet-sim/tests/test_api.py
  • src/fleet-sim/tests/test_optimizer.py
  • src/fleet-sim/tests/test_workload_mixture_optimizer.py
  • src/fleet-sim/tests/test_workload_mixtures.py

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

cdf: list[tuple[int, float]] = []
last = None
for idx, total in enumerate(totals, start=1):
if total == last and idx < n:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The duplicate handling records the cumulative probability at the first occurrence rather than the last one. For example, [10, 10, 20] becomes [(10, 1/3), (20, 1)], although the CDF at 10 should be 2/3; [10, 20, 20] also produces duplicate thresholds. Since traces commonly contain repeated token lengths, this can skew the capacity and cost estimates. Could we aggregate equal totals before constructing the empirical CDF and add coverage for both cases?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 5dd0ee6. _empirical_cdf now groups equal token totals before emitting CDF points, so duplicate lengths use the last cumulative probability. Added regression coverage for both [10, 10, 20] and [10, 20, 20]. Local and clean remote make agent-ci-gate CHANGED_FILES="..." both pass.

weights: dict[str, float],
cdfs: dict[str, list[tuple[int, float]]],
description: str,
) -> MixtureStressCase:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The mixture schema carries model_eligibility and residency, but _case() collapses each workload into a token CDF and the optimizer never evaluates those constraints. This means a "robust" recommendation may combine archetypes that cannot actually run on the same model or placement, even though #2556 requires these constraints to remain hard. Could we either enforce them when building stress cases or avoid returning a feasible recommendation when they cannot be represented?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 5dd0ee6. Mixture stress cases now carry active archetypes plus common model_eligibility / residency; when multiple constrained active archetypes have no common intersection, the case is marked infeasible and robust recommendation is suppressed rather than reporting a feasible CDF-only result. The report/API surface those constraint fields, and tests cover the fail-closed path. Local and clean remote make agent-ci-gate CHANGED_FILES="..." both pass.

Signed-off-by: haowu1234 <13258260125@163.com>
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has had no activity from the submitter for 30 days and has been marked as stale. It will be closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the stale label Aug 18, 2026
@Xunzhuo Xunzhuo added the pr/blocked Blocked on a named decision, dependency, or required check. label Aug 22, 2026
@github-actions github-actions Bot removed the stale label Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/blocked Blocked on a named decision, dependency, or required check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

research: provision fleets for mixed workload archetype distributions

8 participants