Skip to content

fix(operator): refine DGDR v1beta2 API contracts - #3

Merged
ashnamehrotra merged 6 commits into
ashnamehrotra:feat/dgdr-v1beta2-apifrom
ai-dynamo:sttts-dgdr-v1beta2-review-fixes
Oct 13, 2026
Merged

ashnamehrotra merged 6 commits into
ashnamehrotra:feat/dgdr-v1beta2-apifrom
ai-dynamo:sttts-dgdr-v1beta2-review-fixes

Conversation

@sttts

@sttts sttts commented Oct 13, 2026 •

Copy link
Copy Markdown

Summary

ai-dynamo/dynamo#13603 introduces the experimental DGDR v1beta2 API, but several defaulting and lifecycle contracts do not match the intended AISimulate integration. It also adds a generic feature-gate parser for a single experimental API.

This follow-up:

  • replaces the generic --feature-gates=DGDRV1Beta2=... mechanism with the LPX-style --dgdr-v1beta2-enabled boolean and dynamo-operator.dgdrV1Beta2.enabled Helm value
  • removes typed workload.static.requestCount; callers can set AISimulate's native parameters.workload.request_count when they need an absolute count
  • defaults an omitted objective to the Optimize mode and SLA shape while leaving the conditional ThroughputPerGPU metric to admission
  • makes hardware.gpu, hardware.gpu.sku, and hardware.gpu.budget optional so admission can complete partial hardware constraints
  • keeps final candidate metrics while removing candidate conditions; candidates are only published after evaluation completes
  • regenerates DeepCopy code, CRDs, API reference pages, and Helm documentation

A request can combine the typed deployment intent with native AISimulate parameters:

apiVersion: nvidia.com/v1beta2
kind: DynamoGraphDeploymentRequest
metadata:
  name: llama-search
spec:
  model:
    name: meta-llama/Llama-3.1-70B-Instruct
  workload:
    static:
      isl: 4000
      osl: 1000
      kvLoadRatio: [0.0, 1.0]
  objective:
    mode: Optimize
    metric: ThroughputPerGPU
    sla: {}
  aisimulate:
    parameters:
      workload:
        request_count: 1000

A model-only request receives the following structural defaults before admission supplies objective.metric: ThroughputPerGPU and discovers hardware:

spec:
  model:
    name: meta-llama/Llama-3.1-70B-Instruct
  backends: [vllm, sglang, trtllm]
  workload:
    static:
      isl: 4000
      osl: 1000
      kvLoadRatio: [0.0, 1.0]
  objective:
    mode: Optimize
    sla:
      ttftMs: 2000
      itlMs: 30
  recommendation:
    maxCandidates: 1

An explicit objective.sla: {} or workload.static: {} opts out of that nested default. Hardware can be omitted entirely or specified partially, for example hardware: {gpu: {sku: h200_sxm}}; admission resolves only the missing effective values.

Admission follow-up

The CRD already defaults backends, workload and workload.static, objective.mode and objective.sla, and recommendation.maxCandidates. Admission owns the remaining defaults and validation:

Defaulting

  • Resolve missing hardware.gpu.sku and hardware.gpu.budget independently. Preserve explicit typed or native hardware values and discover only what is absent.
  • Set an omitted objective.metric to ThroughputPerGPU in Optimize mode. Leave it absent in Pareto mode.
  • Set an omitted aisimulate.image from operator configuration. Infer its compatibility version from a parseable tag unless versionOverride is present.
  • Construct the effective native input from the typed underlay and apply aisimulate.parameters last using JSON Merge Patch semantics. Native null removes an underlay field.
  • Add native workload.request_count: 1000 unless the effective input selects num_request_ratio. A native value overrides this default.
  • Derive native goal.strict_sla from the effective SLA bounds. Explicit objective.sla: {} leaves it disabled.

Validation

  • Reject unresolved effective hardware after typed input, native input, and discovery are combined.
  • Require versionOverride when the compatibility version cannot be inferred, and reject incompatible AISimulate runner/image declarations before evaluation.
  • Validate the complete merged input against the embedded JSON Schema and equivalent upstream cross-field validators for every known AISimulate version.
  • Allow unknown versions without native-parameter schema validation. When support for a version is added later, allow unchanged-spec updates while requiring every spec mutation to validate the complete effective input.
  • Validate the merged workload and objective, including workload completeness, mutually exclusive load modes, Optimize/Pareto metric shape, distinct Pareto metrics, SLA requirements for goodput, and E2E exclusion from TTFT/ITL.
  • Reject disagreement between explicitly supplied typed objective fields and native parameters.goal. Distinguish explicit values from CRD defaults so defaults do not create false conflicts.
  • Enforce complete Run and Candidate spec immutability, including every key and value inside preserved RawExtension objects.

Final candidates retain evaluation data without a redundant completion condition:

status:
  metrics:
    throughput: 82.4
    throughput_per_gpu: 20.6

The request remains mutable. Run and candidate specs retain the immutability rules from ai-dynamo/dynamo#13603. Controllers own run progress and candidate metrics. The v1beta2 schemas remain disabled by default and unserved, so this does not add conversion behavior; enabling them now uses:

dynamo-operator:
  dgdrV1Beta2:
    enabled: true

Related: ai-dynamo#13545, DGH-1426

Validation

  • make generate manifests generate-api-docs generate-helm-docs
  • go test ./cmd/crd-apply ./api/v1beta2 with Kubernetes 1.30 envtest assets
  • make test in deploy/helm/charts/platform (64 tests)
  • commit-time repository hooks

Signed-off-by: Dr. Stefan Schimanski <sschimanski@nvidia.com>
@sttts
sttts deployed to external_collaborator October 13, 2026 11:47 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown

👋 Hi sttts! Thank you for contributing to ashnamehrotra/dynamo.

Just a reminder: The NVIDIA Test Github Validation CI runs an essential subset of the testing framework to quickly catch errors.Your PR reviewers may elect to test the changes comprehensively before approving your changes.

🚀

@github-actions github-actions Bot added fix external-contribution documentation Improvements or additions to documentation deployment::k8s labels Oct 13, 2026
Signed-off-by: Dr. Stefan Schimanski <sschimanski@nvidia.com>
Comment thread deploy/helm/charts/platform/values.yaml Resolved
sttts added 4 commits October 13, 2026 14:04
Signed-off-by: Dr. Stefan Schimanski <sschimanski@nvidia.com>
Signed-off-by: Dr. Stefan Schimanski <sschimanski@nvidia.com>
Signed-off-by: Dr. Stefan Schimanski <sschimanski@nvidia.com>
Signed-off-by: Dr. Stefan Schimanski <sschimanski@nvidia.com>
@ashnamehrotra
ashnamehrotra merged commit b08ab81 into ashnamehrotra:feat/dgdr-v1beta2-api Oct 13, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment::k8s documentation Improvements or additions to documentation external-contribution fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants