Repository navigation
feat(worker): add offline capacity priors for ModelDeploymentScaler - #800
Merged
Merged
Conversation
- Exercise the real scaler against independent traffic, service and lifecycle models. - Freeze tuning and held-out scenarios and track event-relative response, SLO and cost. - Record whole-token truth and compare QueueUtilization, TokenThroughput and Predictive dynamics. Task 1 of inferencex-model-deployment-scaling. Signed-off-by: thxCode <thxcode0824@gmail.com>
- Resolve exact serving 6-tuples from bounded load curves with typed refusals. - Import verified InferenceX sweeps into priors.yaml and normalize hardware via nodefeature families. - Validate generated catalogs before replacement and add the gpustack-operator-priors skill. Task 2 of inferencex-model-deployment-scaling. Signed-off-by: thxCode <thxcode0824@gmail.com>
- Add optional capacity prior policy, latencyQuantile alignment and observed provenance. - Preserve manual overrides and gate planning on exact 6-tuple offline profile compatibility. - Invalidate stale state and suppress unchanged Kubernetes status writes. Task 3 of inferencex-model-deployment-scaling. Signed-off-by: thxCode <thxcode0824@gmail.com>
- Compare static and passive capacity settings on held-out traffic and prior error sweeps. - Correct synthetic token-gap counts and reject replayed estimator observations. - Record mixed SLO and replica-cost outcomes and defer production online estimation. Task 4 of inferencex-model-deployment-scaling. Signed-off-by: thxCode <thxcode0824@gmail.com>
- Compare fixed manual, tuned manual and offline catalog capacities. - Preserve UID-scoped resets, cooldown and null-aware report evidence. - Verify local executable mocks and reject malformed measurements. Task 5 of inferencex-model-deployment-scaling. Signed-off-by: thxCode <thxcode0824@gmail.com>
- Explain exact 6-tuple matching, Catalog.Resolve pareto selection and partial overrides. - Document three-algorithm simulation dynamics, synthetic results and hardware qualification gates. - Update the shared module index and skill references. Task 6 of inferencex-model-deployment-scaling. Signed-off-by: thxCode <thxcode0824@gmail.com>
…dentity Signed-off-by: thxCode <thxcode0824@gmail.com>
…mark Signed-off-by: thxCode <thxcode0824@gmail.com>
…ts to scaling-benchmark.md Signed-off-by: thxCode <thxcode0824@gmail.com>
…hart-beta diagrams Signed-off-by: thxCode <thxcode0824@gmail.com>
…H200 benchmarks Signed-off-by: thxCode <thxcode0824@gmail.com>
…pport arbitrary latency quantiles Signed-off-by: thxCode <thxcode0824@gmail.com>
Signed-off-by: thxCode <thxcode0824@gmail.com>
Signed-off-by: thxCode <thxcode0824@gmail.com>
|
🔍 OpenCodeReview found 1 issue(s) in this PR.
📄
|
Signed-off-by: thxCode <thxcode0824@gmail.com>
Signed-off-by: thxCode <thxcode0824@gmail.com>
Signed-off-by: thxCode <thxcode0824@gmail.com>
Signed-off-by: thxCode <thxcode0824@gmail.com>
… and support arbitrary latency quantiles Signed-off-by: thxCode <thxcode0824@gmail.com>
Collaborator
Author
Review Round 1 SummaryInline Review Threads (10)
Summary-Routed Findings (
|
| Item | Location | Outcome |
|---|---|---|
| 1 | pkg/worker/scaling/priors/validate.go:180-197 |
Changed (b724758d) — Sorted parallel topology keys before iterating profile.Identity.Parallel so validation error ordering is deterministic. |
| 2 | pkg/worker/scaling/sim/plant.go:362-368 |
Changed (a9896dfd) — Cloned values via slices.Clone before sorting in Quantile, with a regression assertion in TestQuantile. |
| 3 | pkg/worker/webhooks/worker/model_deployment_scaler.go:238-242 |
Changed (0820c1e8) — Read the target ModelDeployment once in validateModelDeploymentScaler via readTargetModelDeployment and passed md into shouldSuppressDefaultSLOs and ResolveModelDeploymentScalerCapacityPriorsWithTarget. |
| 4 | .agents/skills/gpustack-operator-benchmark/scripts/autoscaling_qualification.py:1109-1110 |
Changed (b724758d) — Updated the run_benchmark_suite docstring to accurately describe the serial execution of TokenThroughput and Predictive on the shared 4-GPU node. |
| 5 | .agents/skills/gpustack-operator-benchmark/scripts/autoscaling_report.py:482 |
Changed (819018d6) — Added "reason": None to the non-null branch of metric() so the schema matches the null branch. |
| 6 | pkg/nodefeature/unit_resources_preset.go:191-197 |
Changed (e1b7ae14) — Added isKnownVendorToken so resolveAcceleratorFamily returns empty immediately when tokens[0] is a known manufacturer (nvidia, amd, hygon, ascend, cambricon, metax, iluvatar, mthreads, t-head) and resolveVendorTokens(tokens[1:]) fails, with a regression case in TestResolveAcceleratorFamily. |
| 7 | pkg/worker/controllers/worker/model_deployment_scaler_priors.go:374-377 |
Changed (a9896dfd, e1b7ae14, 0820c1e8, b724758d) — Added regression unit tests covering Quantile non-mutation, resolveAcceleratorFamily unknown vendor models, env secret substring redaction, and unresolved-target admission validation. |
Signed-off-by: thxCode <thxcode0824@gmail.com>
Signed-off-by: thxCode <thxcode0824@gmail.com>
Signed-off-by: thxCode <thxcode0824@gmail.com>
… and support arbitrary latency quantiles Signed-off-by: thxCode <thxcode0824@gmail.com>
…on wording Signed-off-by: thxCode <thxcode0824@gmail.com>
Collaborator
Author
Review Round 2 SummaryInline Review Threads (6)
Summary-Routed Findings (
|
| Item | Location | Outcome |
|---|---|---|
| 1 | .agents/skills/gpustack-operator-benchmark/scripts/autoscaling_qualification.py:1195-1196 |
Changed (14522326) — Truncated timeline.jsonl (timeline_path.write_text("")) at the start of each simulation case before appending samples. |
| 2 | pkg/worker/scaling/priors/validate.go:233-235 |
Changed (7f291781) — Added "load axis is incoherent: " context prefix when wrapping loadAxisIncoherence(profile). |
| 3 | pkg/worker/scaling/sim/traffic.go:49-55 |
Changed (a14c1897) — Cloned and sorted config.Phases by UntilSeconds in NewTraffic, with a regression assertion in TestPlantPartialServiceQuantum. |
| 4 | pkg/worker/controllers/worker/model_deployment_scaler_priors.go:149-153 |
Changed (a1d44b45) — Evicted a single entry when configMapCatalogCache reaches maxCachedConfigMapCatalogs instead of clearing the entire map. |
| 5 | api/worker/v1alpha1/model_deployment_scaler.go:694-703 |
Verified — Generated deepcopy, protobuf, and CRD manifests are up to date (API/verify-generated passes in CI). |
| 6 | pkg/worker/webhooks/worker/model_deployment_scaler.go:1452-1455 |
Changed (a1d44b45) — Added regression coverage in TestModelDeploymentScalerValidate_CapacityPrior. |
| 7 | pkg/worker/scaling/sim/plant.go:363-368 |
Changed (a14c1897) — Clamped the nearest-rank index in Quantile to [0, len(sorted)-1] so q <= 0 and q > 1 cannot panic, with regression assertions in TestPlantPartialServiceQuantum. |
Collaborator
Author
Review Round 3 Summary (
|
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.
What type of PR is this?
/kind enhancement
/kind api-change
/kind documentation
/area worker
What this PR does / why we need it:
ModelDeploymentScalerpreviously required every non-encoderole usingTokenThroughputorPredictiveto supply explicit manual token capacities (tokensPerSecondPerReplica,prefillTokensPerSecondPerReplica,decodeTokensPerSecondPerReplica), or rely on cold-cluster benchmarking before enabling autoscaling. This PR adds offline capacity-prior catalog resolution, a typedModelDeploymentScalerCapacityPriorCatalogschema, a deterministic controller simulation harness, and H200 hardware qualification benchmarks:api/worker/v1alpha1/model_deployment_scaler.go,pkg/worker/scaling/priors/,gen/priors/) — addsspec.algorithm.capacityPrior(catalogRef,headroomdefaulting to"0.75") onModelDeploymentScaler, plus theModelDeploymentScalerCapacityPriorCatalog(apiVersion: worker.gpustack.ai/v1alpha1,kind: ModelDeploymentScalerCapacityPriorCatalog) non-CRDruntime.Objectschema supporting arbitraryp<N>latency quantile keys in(0, 100](p25,p50,p70,p90,p95,p99, etc.), embeddedpkg/worker/scaling/priors/priors.yaml(qualified from SemiAnalysis InferenceX and local H200 sweeps), andmake generate priors(gen/priors) for offline import, merge, and retirement.pkg/worker/controllers/worker/model_deployment_scaler_priors.go,pkg/worker/webhooks/worker/model_deployment_scaler.go) — resolves role capacity priors from the embedded catalog or a same-namespaceConfigMap(catalogRef), matching canonical(role, model, quantization, engine, hardware, tp, dp, ep)identity inferred fromModelArtifact(spec.source.huggingFace.repoorspec.source.modelScope.repoviaspec.model.artifactRef), role engine flags (--quantization,-tp,-dp,--enable-expert-parallel), andInstanceType/ node hardware (nvidia-h100,nvidia-h200140Gi/141Gi,nvidia-b200,amd-mi300x,amd-mi325x,amd-mi355x). Evaluates the highest-throughput operating point satisfying configured TTFT/ITL latency targets with exact or two-bracket linear quantile interpolation, scales byheadroom, preserves explicit capacity overrides per field, and surfacesCapacityPriorResolved(CatalogResolved,ConfigMapNotFound,CatalogInvalid,RoleIdentityUnresolved,ProfileNotFound,NoPointWithinLatencyTarget).pkg/worker/controllers/worker/model_deployment_scaler_sim_test.go,pkg/worker/scaling/priors/estimator_eval_test.go) — exercises the real sampler, algorithms (Proportional,TokenThroughput,Predictive), and planner across 9 synthetic traffic scenarios (idle,step,ramp,burst-fault-reset,holdout-cache-shift,noise,quota-ceiling,quota-shortfall,length-shift), and evaluates five frozen capacity estimation candidates on disjoint holdout splits.docs/modules/model-deployment/scaling.md,scaling-benchmark.md,scaling-simulation.md,docs/walkthroughs/model-deployment/scaling.md,.agents/skills/gpustack-operator-priors/,.agents/skills/gpustack-operator-benchmark/) — adds H200 4-node hardware qualification results (Suites A–E), Mermaidxychart-betatrend charts with explicit color legends, algorithm selection and tuning guidance, thescaling-simulation.mdreference, and thegpustack-operator-priorsmaintenance skill.Which issue(s) this PR links to:
Addresses #756
Special notes for your reviewer:
specs/2026-10-26-inferencex-model-deployment-scaling.md.ModelDeploymentScalerCapacityPriorCatalogis annotated with+protobuf=falseand+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Objectso it generates deepcopy and OpenAPI definitions without producing a separate CRD or protobuf type.Does this PR introduce a user-facing change?