Skip to content

Heterogeneous sweeps (#372) + GPU auto-AMI fix (#384) - #383

Merged
scttfrdmn merged 2 commits into
mainfrom
feat/372-heterogeneous-sweeps
Jul 19, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
feat/372-heterogeneous-sweeps

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Closes #372. Lets a --param-file sweep vary instance_type (and ami/spot) per entry, so one sweep runs the same workload across different instance families — a price-performance benchmark (e.g. GROMACS on c8i/c8a/c8g/g6/g6e).

What was broken

buildLaunchConfigFromParams already parsed per-entry instance_type/ami/spot, but launchParameterSweep detected the AMI once from the first entry and applied it to all — so arm64 (c8g) and GPU (g6) entries got an x86 non-GPU AMI and failed to boot. And entries omitting instance_type got no fallback to the top-level --instance-type.

Changes (cmd/launch_sweep.go)

  • Per-config AMI detection keyed by (region, arch, GPU) with a memo cache — each entry gets an arch/GPU-appropriate AMI; entries sharing an architecture reuse one SSM lookup. Explicit ami: still wins.
  • instance_type base fallback — an entry without one inherits --instance-type.
  • Per-config OS resolution + mixed-OS guard — a sweep must be all-Linux or all-Windows (rejected before launch, since one command/lifecycle can't span both).

Tests (cmd/sweep_test.go)

  • per-entry instance_type/ami/spot override parsing
  • AMI-cache-key separates x86/arm64/GPU and region (c8i≡c8a, c8g≠c8i, g6≠c8i)

Scope note

Detached (--detach, Lambda-orchestrated) sweeps already honor a per-entry explicit ami: but don't auto-detect one — documented; auto-detection there is a larger separate change (the Lambda would need SSM AMI lookup + arch detection). No new flags, no param-file format change.

Docs (heterogeneous-sweep example + the OS/detached caveats) land in a parallel umbrella PR.

… + AMI (#372)

A --param-file sweep can now vary instance_type/ami/spot per entry, so one sweep
runs a workload across different instance families (price-performance benchmarks).

- Per-config AMI detection keyed by (region, arch, GPU) with a memo cache, instead
  of forcing the first entry's AMI onto every entry — arm64 (c8g) and GPU (g6)
  entries previously got an x86 non-GPU AMI and failed to boot.
- Entries omitting instance_type fall back to the top-level --instance-type.
- Per-config OS resolution + a mixed-OS guard (a sweep must be all-Linux or
  all-Windows).
- Tests: per-entry override parsing + arch/GPU/region AMI-cache-key separation.

Detached/Lambda sweeps already accept a per-entry explicit ami: but don't
auto-detect — documented as a follow-up. Closes #372.
@codecov

codecov Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.66667% with 38 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/launch_sweep.go 0.00% 38 Missing ⚠️

📢 Thoughts on this report? Let us know!

Auto-AMI queried al2023-ami-kernel-default-gpu-* SSM params that don't exist →
every GPU launch without --ami failed with ParameterNotFound. Point GPU AMIs at
the real Deep Learning Base OSS Nvidia Driver GPU AMI (AL2023) in the
deeplearning SSM namespace.

Also fix DetectGPUInstance: add missing NVIDIA families (g6e/g7e/g7/g4dn/p4de/
p5e/p6 — newer ones silently fell back to a CPU AMI) and stop misclassifying
Neuron (inf*/trn*) and AMD (g4ad) as NVIDIA GPUs. Aligned with truffle's family
list. Closes #384.
@scttfrdmn scttfrdmn changed the title Heterogeneous parameter sweeps: per-entry instance type + AMI (#372) Heterogeneous sweeps (#372) + GPU auto-AMI fix (#384) Jul 19, 2026
@scttfrdmn

Copy link
Copy Markdown
Contributor Author

Added the GPU auto-AMI fix (#384) to this PR — it's a prerequisite for the heterogeneous-sweep GPU example (g6/g6e/g7e entries) to actually launch.

#384: auto-AMI queried al2023-ami-kernel-default-gpu-{x86_64,arm64} SSM parameters that don't exist → every GPU launch without --ami failed with ParameterNotFound. Now resolves the Deep Learning Base OSS Nvidia Driver GPU AMI (AL2023) via the deeplearning SSM namespace (verified: both x86_64 and arm64 params resolve to real AMIs).

Also fixed DetectGPUInstance:

  • Added missing NVIDIA families g6e, g7e, g7, g4dn, p4de, p5e, p6 — newer families weren't detected as GPU and silently got a CPU AMI (a worse, driver-less failure than ParameterNotFound).
  • Removed misclassifications: Neuron (inf*/trn*) and AMD (g4ad) are no longer treated as NVIDIA GPUs (the Nvidia-driver AMI wouldn't fit them).
  • Aligned the family list with truffle (the capability authority); truffle also gains the g7/RTX PRO 4500 entry in Add G7 family (NVIDIA RTX PRO 4500) truffle#99.

Tests updated: real DL SSM paths + g6e/g7e/g7 regressions + Neuron/AMD negatives. Closes #384.

@scttfrdmn
scttfrdmn merged commit 92a5424 into main Jul 19, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the feat/372-heterogeneous-sweeps branch July 19, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: heterogeneous parameter sweeps (vary instance-type per sweep entry)

1 participant