Explore scratchpad · NVIDIA/hyperflare-inference #635

Raw Markdown for agents: https://autobot.eidonix.com/p/558db9cc-d30c-4dcb-bc62-d8682b48c473.md

#1 [high] Change: what PR #635 does (verified from diff)

PR #635 "Pass candidate GPUs into filter_world_sizes during planning", author nero- (Jonathan Gutierrez, GitHub CONTRIBUTOR), head c2ef797, base main, opened+updated 2026-11-30, 2 files +41/-5, no reviews, no CI checks, ready for review. No PR comments at all (pr_comments empty).

Code change — ignition/planning.py (plan(), lines 543-650 at head):

Test — tests/cli/test_planning.py:568-598 test_filter_world_sizes_receives_selected_or_supported_gpus: defines local CapabilityAwareParams(RecipeParameters) whose filter_world_sizes restricts sizes to (3,4) when all context.gpus have capability (12,1) (SM121) and to (4,) otherwise; toy recipe with ranks for TP3 and TP4; asserts 4x SM120 automatic -> TP4; 3x SM120 with selected=(0,1,2) -> CapacityError "needs 4"; 3x SM121 explicit selected -> TP3; 3x SM121 automatic -> TP3.

#3 [high] Change: undeclared side effects and limits of the new GPU argument

Verified behavioral details beyond the description:

  1. Error-precedence swap (undeclared): before, the "no supported tensor-parallel size remains for {alias} with the selected parameters" UsageError (head lines 575-576) was raised BEFORE the out-of-range --gpus UsageError ("--gpus ... names a GPU this host does not have", 569-571). Now the --gpus index check runs first, so --gpus 9 on an unsupported-parameter recipe reports the GPU-index error instead of the parameter error. Same messages, different order.
  2. params.validate(pre_context) at planning.py:563 still receives gpus=(), and a second validate with gpus=chosen runs only on the failure path (582). So filter_world_sizes now sees GPUs while the validate immediately before it does not — an asymmetry the description does not mention (it says "Pre-GPU params.validate(pre_context) ... unchanged", which is true).
  3. The hook never receives world_size: neither call site passes it (574, 611-613), so a recipe can see which GPUs but not which candidate TP size is under consideration; it can only filter the set. Plan.parameter_context (planning.py:231-239) by contrast carries both gpus and world_size for later hooks.
  4. Automatic planning passes only supported GPUs (tuple(supported)), so the filter cannot observe non-supported devices on the host; explicit --gpus passes the actual chosen devices even if some are unsupported (the unsupported-device CapacityError at 587-589 still fires afterwards).
  5. Consistency: candidates() (608-614) returns early with fitted(chosen...) when chosen is not None (609-610), so the two call sites never disagree about which GPU set applies.
  6. Surface reach of filter_world_sizes calls in-tree: only planning.py (2 sites). In-repo overrides exist only in tests (tests/cli/test_planning.py:81 ToyShardingParameters, tests/cli/test_commands.py:55 FixtureShardingParameters) and both ignore context.gpus. tests/cli/test_planning.py:105 reads context.gpus in validate (SM103 rejection) — the neighbouring hook that already had GPUs, though its any(...) is empty-safe.

#4 [high] Related work: #545 built the hook, #499/#508 moved capability gating into recipes

#5 [high] Claims and evidence: CPU test only, no CI on head, multi-host path untested

#11 [high] Research summary

Case file for PR #635 (nero-, head c2ef797, open, ready for review, 2 files +41/−5, no comments, no reviews, no CI). Ten scratchpad entries cover every angle: change, undeclared side effects, why, related work, recent activity, people, community, charter fit, claims/evidence, reach, process.

Key findings not evident from the description: (1) the reordering silently swaps error precedence — the out-of-range --gpus UsageError now fires before the "no supported tensor-parallel size remains" error (planning.py:569-576); (2) params.validate() immediately before the filter still gets gpus=() (563) while the filter now gets real GPUs, and neither call site passes world_size, so a recipe can see which GPUs but not which candidate TP size; (3) automatic planning exposes only supported devices, explicit --gpus exposes the exact (possibly unsupported) selection, and the multi-host path feeds peer-topology GPUs from serve.py:421 — untested; (4) no CI ran on the head even though .github/workflows/python-cpu.yml (not opened) runs the CPU suite on every PR, and the only evidence is the author's CPU unit test, with the SM121 live validation deferred to an external hyperflare-recipes PR.

Context established: the hook came from #545 four days earlier and simply defaulted ParameterContext.gpus to (); earlier per-flag capability gating in planning (#499, #508) has since left core, which is the strongest argument for this PR's approach. #533 overlaps the same plan() prologue on a different hook; no conflict visible. The author is a repeat owner of DGX Spark / SM121 cross-host TP work (#161, #220, #433, #467), and zero engagement exists so far. Charter lines on model-agnostic core, evidence, and the four-part description were mapped; the change adds no CLI, default, manifest, doc, or schema surface.

#13 [high] Project fit: charter aligns on model-agnostic seams; no roadmap item or maintainer request cited

Lines up:

Does not line up / friction (facts, not judgements):

#15 [high] Event 2026-11-30 10:44–11:17: case file + Autobot review + author reply (fixes NOT in branch)

New since report #14 (all times 2026-11-30):

  1. 10:44 UTC flare-autobot "A case file has been opened for 635" — Case File https://autobot.eidonix.com/api/v1/cases/2e55f562-8fca-42d7-93b8-c2b6ef58bb79.html, Intake Report https://autobot.eidonix.com/p/5117ddcf-2af9-45c1-b267-d3e5503f27a7.html. Says future reviews auto-run 90 min after pushes; opt-out via #autobot:ignore. This retires my earlier finding "no autobot case file / pipeline never ran" (scratchpad #12, case-file finding 9).
  2. 11:02 UTC Autobot Review, Recommendation: Changes Requested, 0 blockers / 1 should-fix / 2 subtract-simplify / 2 nits. Full Review https://autobot.eidonix.com/p/296b682c-50fb-4a96-9867-0a02866f4e2f.html, Value Proposition https://autobot.eidonix.com/p/ca9e09d4-b50d-464d-b1c3-0834343486a6.html. Merge risk "Low · up to c2ef797". Pre-merge checks: security ✅, charter & value fit ✅, related/duplicate ✅, tests/verification ⚠️.
  3. 11:17 UTC author (nero-) reply: claims all review items addressed — moved if not gpu.supported: CapacityError ahead of filter_world_sizes plus "explicit SM90 test", supported built as a tuple and filter_gpus reused in candidates(), test simplified to reuse _recipe()/_gpu(), and context.gpus/context.world_size contract documented on ParameterGroup.filter_world_sizes; says tests/cli/{test_planning,test_commands,test_parameters,test_gpu_discovery}.py → 29 passed; pings @flare-autobot.

None of those edits are on the branch. Head is still the single commit c2ef7974 (search_history at head: newest commit, no second commit; pr_files still ignition/planning.py +9 -5, tests/cli/test_planning.py +32 -0). At head, verified:

So the one should-fix and both simplifications are still open, and the reply is unverified against the code (either the push did not land or the comment precedes it). No CI run appears either. Test-count plausibility: the four named files hold 24 def test_ functions (7+3+7+7), so "29 passed" is plausible only via parametrization (e.g. tests/cli/test_gpu_discovery.py:61-144 parametrized) — not verifiable from here.

#16 [high] Autobot should-fix: unsupported explicit --gpus reaches filter, exit 4 becomes exit 2 (confirmed)

Autobot's only should-fix (2026-11-30 11:02) is real and sharper than my earlier note (scratchpad #3 item 4). Mechanism, verified at head c2ef797:

Caveat on the suggested fix (move the not gpu.supported check before the filter): that check currently sits after len(chosen) not in plan_sizes → params.validate(replace(pre_context, gpus=chosen, world_size=len(chosen))) (:582) → generic "needs N GPUs" CapacityError (:583-586), with an explicit comment that recipe validate should surface its own UsageErrors first (:580-581; the in-repo precedent is the --sharded-prefill is not qualified on SM103 UsageError read from context.gpus at tests/cli/test_planning.py:105-106). Hoisting the architecture check above the filter therefore masks recipe-declared parameter UsageErrors for selections that mix unsupported and supported devices — a precedence change of the same class Object reviewing. A narrower fix targeted at "filter must never see unsupported devices" would be to pass filter_gpus = tuple(g for g in chosen if g.supported) (or filter-then-check only for the empty-result case) and keep the SM-check where it is.

Test gap confirmed: the new test only asserts supported-only scenarios — automatic 4×SM120 → TP4, explicit 3×SM120 → CapacityError "needs 4", explicit/automatic 3×SM121 → TP3 (tests/cli/test_planning.py:590-596). No unsupported-capability GPU is constructed anywhere in tests/cli/ (SM90/(9,0) appear only in tests/test_kv_codec.py:15 and ignition/preparation/kv_codec.py:43).

#18 [high] Research summary

Amended the #635 case file for the 2026-11-30 event (bot case file + Changes Requested review at 10:44/11:02 UTC, author reply at 11:17 UTC; head still c2ef7974, no new commits).

Amendments, in short: (a) my earlier finding that no bot case file / no automated review existed is now superseded — one machine review with 0 blockers / 1 should-fix / 2 simplify / 2 nits, still zero human engagement; (b) that review independently confirms my charter-fit, rebase-clean and backward-compatibility findings and promotes my soft "automatic vs explicit GPUs differ" note to the single should-fix — explicit --gpus feeds unsupported devices into filter_world_sizes, turning a hardware CapacityError (exit 4) into a parameter UsageError (exit 2), a regression versus main, which I confirmed in code including that exit codes reach the process via ignition/cli/__init__.py:373-377; (c) a new caveat the review and the author both miss: simply hoisting the not gpu.supported check above the filter masks recipe-declared parameter errors for mixed selections, so a narrower fix is needed; (d) a new finding — the author's "addressed all review items" comment is not reflected anywhere at head (list vs tuple, filter_gpus unused in candidates(), check still post-filter, test not simplified, docstring unchanged, no unsupported-GPU case), and "29 passed" is exactly the four files' collection total at head, with still no CI run; (e) the external live evidence now has a number, local-inference-lab/hyperflare-recipes#103.

Everything else in the original report stands unchanged. Notes: scratchpad #15, #16, #17.

#19 [high] Consolidated amendment set for the report (replaces nothing; supersedes #12, sharpens #3/#5/#9)

Event reviewed: 2026-11-30 10:44 case-file comment, 11:02 Autobot Review (Changes Requested), 11:17 author reply. Head unchanged at c2ef7974, single commit, +41/−5 in 2 files (pr_files), no new commits (search_history at head; newest commit is c2ef7974 itself).

AMENDMENTS TO ISSUE, in the order they should appear (the report is an amendment-only delta; the base report is scratchpad #14):

A1. Supersedes: "no bot case file / automated pipeline never ran" (#12, and finding 9 of #14, and the corresponding line in #14's Community section). flare-autobot opened a case file at 10:44 UTC (case, intake) and posted a full review at 11:02 UTC (review, value prop): Changes Requested, 0 blockers / 1 should-fix / 2 subtract-simplify / 2 nits, "Merge Risk: Low · up to c2ef797", pre-merge checks security ✅, charter & value fit ✅, related/duplicate ✅, tests & verification ⚠️. Pipeline policy: reviews auto-run 90 min after pushes, opt-out #autobot:ignore. Engagement count becomes 1 bot review + 2 bot comments, still zero human comments/reviews/reactions and no labels — the "single strongest signal is nobody has looked at it" point in #12/#14 survives, only its cause changes.

A2. Corroboration (no change to my findings, worth one line each): the machine review independently reaches the same conclusions on charter/value fit (policy stays in recipe RecipeParameters, no model branches in core), rebase-cleanliness, and backward compatibility for both in-repo overrides (tests/cli/test_planning.py:81-85, tests/cli/test_commands.py:55-59) — all in #13/#14 already.

A3. Sharpens my #3 item 4 into the PR's only should-fix (mechanism in #16). With filter_gpus = chosen (ignition/planning.py:573) the filter at :574 sees unsupported devices; the architecture CapacityError is only at :587-589, so a capability-gated filter returning () raises UsageError at :575-576 → exit 2 instead of exit 4. On main the filter still gets the default gpus=() (ignition/parameters.py:130) so the same command exits 4: it is a user-visible CLI regression (codes wired at ignition/cli/init.py:373-377; values at ignition/errors.py:13-22), on export/serve/bench one-shot setup, on exactly the recipe-facing axis the PR creates. Trigger set: ignition/planning.py:37-53 (SM87/103/110/120/121). My base report had this only as "automatic vs explicit expose different GPU sets" and as the undeclared precedence swap — upgrade the severity language to match.

A4. New critique the review and the author both miss (#16, second half): hoisting if not gpu.supported: above the filter masks recipe-declared parameter UsageErrors for mixed unsupported+supported selections, because today it deliberately runs after params.validate(replace(pre_context, gpus=chosen, world_size=len(chosen))) at :582 (rationale comment :580-581; in-repo precedent tests/cli/test_planning.py:105-106, the SM103 rejection read from context.gpus). Safe alternative: filter on tuple(g for g in chosen if g.supported).

A5. New finding: the author's 11:17 UTC "addressed all review items" is not on the branch (#15). Claimed: check moved above filter + "explicit SM90 test", supported as a tuple, filter_gpus reused in candidates(), test reusing _recipe()/_gpu(), context.gpus/context.world_size documented on ParameterGroup.filter_world_sizes; reported "29 passed". At head: supported is a list comprehension (:566); filter_gpus used only at :574 while candidates() still passes tuple(supported) (:611-612); not gpu.supported still :587-589; test still inline Checkpoint/Recipe/planning.Gpu (tests/cli/test_planning.py:568-596) with no unsupported-GPU case (SM90/(9,0) absent from tests/cli/); docstring still the one-liner (ignition/parameters.py:560-561, byte-identical to main). So the should-fix and both simplifications are still open and comment state diverges from code state. "29 passed" is exactly the four named files' collection total at head (7+5+7+10 = 24 defs + 5 parametrized extras, #17) — consistent with a run on c2ef797, not evidence of a push. No CI has reported (.github/workflows/python-cpu.yml:1-33), which the review itself flags.

A6. Citation upgrade: the external live evidence is local-inference-lab/hyperflare-recipes#103 (disclosed in the review), replacing my unspecific "companion recipes PR" in #14.

Unchanged / re-affirmed: params.validate(pre_context) asymmetry (:563 vs :574) — the review did not flag it, still my finding; neither filter call receives world_size (:574, :611-613) — also not flagged by the review; no cited issue, roadmap item, maintainer request or design sign-off; test covers only supported synthetic GPUs on a single host, multi-host --ranks/topology_gpu (ignition/cli/serve.py:199, 421) still untested; main baseline untouched (no drift).

#2 [medium] Charter/process fit: evidence standard, model-agnostic rule, PR description rules

Charter (read_charter):

#6 [medium] People: nero-'s DGX Spark TP series and the maintainers who own planning.py

#7 [medium] Recent activity: planning.py is high-churn maintainer code; branch has no drift

Recent commits in the touched areas (from orientation packet + search_history, default branch):

#8 [medium] Reach: every ignition plan/export/bench path, zero CLI surface, external recipe consumer

#9 [medium] Process: ready-for-review, 1 commit, 2 files, no CI, no design sign-off, no cited issue

#10 [medium] Why: no linked issue; need inferred from author's SM121 TP series and TODO

#12 [medium] Community: zero engagement, no autobot case file opened

#17 [medium] Verified: "29 passed" matches the head's exact collection total; exit codes wired via FlareError

Two checks completing the amendment:

  1. Author's "29 passed" is arithmetically the head's collection total. For the four files nero- named (tests/cli/{test_planning,test_commands,test_parameters,test_gpu_discovery}.py): test_planning 7 def test_ / 0 parametrize; test_commands 3 tests + @parametrize("command", ["export","debug-serve","bench"]) (test_commands.py:114) = 5; test_parameters 7 / 0; test_gpu_discovery 7 tests + parametrize at :68-69 (2), :95-96 (2), :126-127 (2) = 10. Total 7+5+7+10 = 29, exactly as claimed, i.e. consistent with a run on the tree at c2ef797 (7 planning tests). Not proof the fixes were never written — the author could have added the SM90 coverage inside the existing test function — but it is consistent with the branch being untouched, and the code facts above are decisive either way (filter still called with chosen, check still after the filter, docstring unchanged).

  2. Exit codes really do reach the process. ignition/cli/__init__.py:373-377 catches FlareError, prints it and returns error.exit_code, so the UsageError(2)/CapacityError(4) distinction the Autobot review describes (ignition/errors.py:13-22) is user-visible CLI behavior, not internal: --gpus selecting an unsupported device changes one-shot flare export|serve|bench from exit 4 to exit 2 when the recipe gates on context.gpus. Highest-impact, least-documented consequence of the PR; also the part the new test does not cover (tests/cli/test_planning.py:590-596 asserts only supported GPUs).