# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeploymentRequest
metadata:
  name: example-llm-sla
spec:
  modelName: "meta/llama3-70b"
  backend: trtllm # enum: [vllm, sglang, trtllm]; default is trtllm
  sla: # SLA profiling targets (all fields optional with defaults)
    itl: 10    # Inter-Token Latency target in milliseconds (default: 10)
    ttft: 50   # Time To First Token target in milliseconds (default: 50)
    isl: 3000  # Input Sequence Length (default: 3000)
    osl: 500   # Output Sequence Length (default: 500)
  gpu: # optional
    type: h200_sxm
    minNumGPUsPerEngine: 1  # default is 1
    maxNumGPUsPerEngine: 8  # default is 8
  online: false # true for online profiler, false for AIC profiler

  # Optional: Automatically create DynamoGraphDeployment after profiling
  autoApply: true  # default is false

  # Optional: Override metadata for auto-created DGD (only used when autoApply: true)
  # deploymentOverrides:
  #   name: my-custom-dgd-name
  #   namespace: production
  #   labels:
  #     team: ml-platform
  #   annotations:
  #     description: "Auto-generated from DGDR"

  # Currently required for both online and offline/AIC profiling, but will be removed in the future
  profilingConfig:
    configMapRef:
      name: my-profiling-config
      key: disagg.yaml  # default is "disagg.yaml"
