Generate a DGD with AISim
Use AISim’s recommend command with NVIDIA Dynamo’s dgd output adapter to generate a
DynamoGraphDeployment (DGD) before deploying it to Kubernetes. The search runs offline; it does
not create cluster resources. You inspect the generated manifest and apply it yourself.
Experimental. The AISim CLI and output-adapter contracts may change without a standard deprecation period. Simulation results are estimates; validate the selected deployment on your hardware before relying on its performance.
For an operator-managed search with persistent Requests, Runs, and Candidates, use Search with DGDR v1beta2.
Prerequisites
- A Linux environment with Python 3.11 through 3.13, Dynamo, and the matching
aisimpackage. Follow Dynamo Sweeper Integration for a planner image or source installation. Installai-dynamoin the same Python environment as the CLI: AISim alone does not register thedgdadapter. - Access to the model’s Hugging Face configuration and AISim performance data for your model, hardware, and backend. The search does not require serving GPUs.
- For deployment, a cluster with the Dynamo operator, matching DGD CRDs, and GPUs that match the configuration. The example targets H200 GPUs and vLLM.
Generate and Deploy
Verify the output adapter installation
List the registered DGD adapter in the active environment:
Expected output:
If the list is empty, install Dynamo in this environment. From a source checkout, run
python3 -m pip install --no-deps -e . after completing the source installation above.
Create the recommendation input
Save the following as recommendation.yaml. It searches one or two aggregated vLLM workers and
two scheduler token budgets for Qwen3-8B, with at most two GPUs per candidate:
Set engine.hardware, the worker search space, and dgd.num_gpus_per_node to match your target
cluster. Use a dgd.runtime_image compatible with your backend and operator. The GPU budget limits
each candidate; num_gpus_per_node describes node capacity rather than allocating eight GPUs.
engine.model selects the model evaluated and served. dgd.name names the Kubernetes resource.
The top-level dgd section configures output only and does not change the search objective.
Run the search
--stack dynamo selects Dynamo replay and its configured Router or Planner adapters. --output dgd
independently selects DGD generation. The CLI applies --set overrides, extracts the dgd
section, and validates the recommendation input before searching.
For a scalar objective, the output adapter renders the final selected winner. It does not publish intermediate trial manifests. Inspect these files after a successful search:
recommendation.json contains the search results, and recommendations/ contains selected
prediction configurations. index.json lists the DGD artifacts. For this manifest output:
Use a fresh output directory for each run. To override an output setting without editing the file:
Inspect and apply the manifest
Review the selected worker replicas, GPU requests, model arguments, runtime image, and namespace
in generated/deployment.yaml. Add cluster-specific configuration such as model-cache volumes,
credentials, or scheduling constraints where required; see Deploy with DGD.
Create the example namespace if it does not exist, then ask the API server to validate the manifest:
Apply the reviewed manifest and wait for readiness:
Expose the service and verify an inference request as described in Expose the Frontend.
Export a Kustomize Bundle
To export a bundle instead of a single manifest, replace the complete dgd section with:
Remove output_file; the two destination fields are mutually exclusive. Run the recommendation
command with a fresh CLI output directory, for example --output-dir generated-kustomize.
The bundle contains generated-kustomize/deployment/deploy.yaml and kustomization.yaml.
Inspect the rendered bundle before applying it:
Export Pareto Alternatives
For multiple final tradeoffs, set optimization.target: pareto and include a literal {index} in
both the DGD name and its output destination. For manifest output, replace optimization and dgd
in the original input with:
Run with a fresh CLI output directory. The adapter writes every final selected Pareto candidate
using zero-based, three-digit indices, such as candidate-000.yaml and candidate-001.yaml.
The number of alternatives depends on the search results. Inspect index.json to find them.
For Kustomize output, use format: kustomize and output_dir: candidate-{index} instead of
output_file. Each candidate receives an independent bundle. Choose one alternative to deploy;
applying every candidate creates multiple deployments and consumes their combined GPU capacity.
Troubleshooting
See DGD Output Adapter Configuration for the full output contract, validation rules, and current limitations.