Skip to content

feat: --gpu flag to steer offer search toward specific hardware#2

Merged
jhammant merged 2 commits into
jhammant:mainfrom
nathanmarlor:feat/gpu-steer-flag
Jun 30, 2026
Merged

feat: --gpu flag to steer offer search toward specific hardware#2
jhammant merged 2 commits into
jhammant:mainfrom
nathanmarlor:feat/gpu-steer-flag

Conversation

@nathanmarlor

@nathanmarlor nathanmarlor commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What

Adds a --gpu flag to aiod spin and aiod estimate to steer the offer search toward specific hardware.

  • Repeatable. Within one query, all whitespace-separated tokens must appear in the GPU name (case-insensitive); across multiple --gpu flags, any match wins.
  • --gpu 'rtx 6000' matches RTX PRO 6000 WS; --gpu a6000 matches RTX A6000; --gpu 6000 matches both. Prefer spaced tokens — a glued rtx6000 only matches a contiguous run.

How

  • vast: fetch a wider offer pool, filter client-side via shared gpu_name_matches(), trim to limit — vast's gpu_name API filter is exact-match only.
  • runpod: filter gpu types by displayName using the same matcher (signature parity with the vast client).
  • spin: emits "no offer found matching --gpu ..." when the filter empties results.
  • estimate: the "Cheapest fit" column now shows the real matched offer (offer.gpu_name) instead of the sizing-tier proxy, which previously made --gpu look broken even when it matched.

Usage

```
aiod spin Qwen/Qwen2.5-Coder-32B-Instruct -q fp8 --gpu 'rtx 6000'
aiod estimate --gpu a6000 --gpu h100
```

TUI and lazy-spin proxy unchanged.

Testing

57 existing tests pass. Verified live: --gpu '6000' and --gpu 'rtx 6000' both resolve to 4x RTX PRO 6000 WS in the estimate table.

Add a repeatable, case-insensitive substring filter on GPU name to
`aiod spin` and `aiod estimate`, e.g. `--gpu rtx6000` to target RTX
6000Ada / A6000 cards.

- vast: fetch a wider offer pool, filter by normalised name substring,
  trim to limit (vast's gpu_name API filter is exact-match only).
- runpod: filter gpu types by displayName substring.
- spin: "no offer found matching --gpu ..." when the filter empties results.
@nathanmarlor
nathanmarlor force-pushed the feat/gpu-steer-flag branch from 90be822 to ddd0280 Compare June 30, 2026 08:49
…ching

The estimate table showed the sizing tier (e.g. 'A100 80GB') instead of
the actual matched offer, so --gpu looked broken even when it matched.
Show offer.gpu_name/num_gpus instead.

Matching is now token-AND within a query (whitespace-split): --gpu 'rtx 6000'
matches 'RTX PRO 6000 WS'. Shared gpu_name_matches() used by vast + runpod.
@jhammant
jhammant merged commit 44eb6fc into jhammant:main Jun 30, 2026
2 checks passed
jhammant added a commit that referenced this pull request Jun 30, 2026
Cuts v0.2.0 (bundles the merged contributor work: vast v0->v1 instances
fix #1, --gpu offer steering #2, download progress in status #3) and adds
a live smoke-check for the one failure class the mocked suite can't catch:
an upstream vendor deprecating an endpoint (as in #1, where vast's v0
instance list began returning HTTP 410).

- tests/test_live.py: @pytest.mark.live probes of the real vast/runpod/HF
  endpoints aiod depends on. Excluded from the default run (addopts
  -m "not live") so `pytest tests/` stays hermetic; run via `pytest -m live`.
- .github/workflows/smoke.yml: weekly + manual. Auth-free probes (runpod
  pricing, HF sizing) need no secrets; vast/runpod authed probes run only
  if VAST_API_KEY/RUNPOD_API_KEY repo secrets are set. Never runs on
  pull_request, so fork PRs can't reach secrets. Opens an issue on failure.
- pyproject: register + default-exclude the `live` marker; bump 0.1.0 -> 0.2.0.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jhammant

Copy link
Copy Markdown
Owner

Thanks @nathanmarlor — merged 🎉 and shipped in v0.2.0.

The token-AND matching in gpu_name_matches is exactly the right ergonomics (--gpu 'rtx 6000' matching "RTX PRO 6000"), and switching the fit display to the real rented card instead of the sizing-tier proxy is a solid fix.

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.

2 participants