Skip to content

Remove dead import and redundant entry dicts in generate_sweep_configs#1096

Merged
Oseltamivir merged 1 commit intomainfrom
fix/remove-dead-code-sweep-configs
Apr 20, 2026
Merged

Remove dead import and redundant entry dicts in generate_sweep_configs#1096
Oseltamivir merged 1 commit intomainfrom
fix/remove-dead-code-sweep-configs

Conversation

@Oseltamivir
Copy link
Copy Markdown
Collaborator

Summary

  • Remove unused from ast import For import — leftover from an earlier draft, never referenced
  • Remove dead entry dict in multinode branch of generate_full_sweep() that was immediately overwritten by the identical dict inside the for runner_value loop
  • Remove dead entry dict in single-node branch (same pattern)
  • Hoist loop-invariant seq_len_str and runners_for_entry above the loops where they belong

Based on @aryanputta's work in #1095.

Test plan

  • python3 -c "from utils.matrix_logic.generate_sweep_configs import generate_full_sweep" — no ImportError
  • All 88 unit tests pass: python3 -m pytest utils/matrix_logic/

- Remove unused `from ast import For` import
- Remove dead entry dict in multinode branch that was immediately
  overwritten by the for-loop below it
- Remove dead entry dict in single-node branch (same pattern)
- Hoist loop-invariant seq_len_str and runners_for_entry above loops

Co-Authored-By: Aryan Putta <aryansputta@gmail.com>
@Oseltamivir Oseltamivir requested a review from a team April 20, 2026 01:26
@Oseltamivir Oseltamivir merged commit 868ed43 into main Apr 20, 2026
6 checks passed
@Oseltamivir Oseltamivir deleted the fix/remove-dead-code-sweep-configs branch April 20, 2026 01:30
Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — dead code removal and loop-invariant hoisting with no behavioral change.

Extended reasoning...

Overview

Single-file cleanup in utils/matrix_logic/generate_sweep_configs.py: removes an unused from ast import For import, two dead entry dict assignments that were immediately shadowed by identical dicts inside inner loops, and hoists seq_len_str/runners_for_entry (which don't vary per runner or conc iteration) above those loops.

Security risks

None. The changes are purely structural — no auth, crypto, permissions, or external I/O is touched.

Level of scrutiny

Low. This is textbook dead-code elimination: the removed dicts are provably unreachable (assigned then immediately overwritten), and the hoisted variables are loop-invariant by inspection. The diff is small and self-contained, and 88 unit tests already cover the function.

Other factors

No prior reviews or outstanding comments. The test plan confirms both an import sanity check and the full unit test suite pass.

OCWC22 added a commit to OCWC22/InferenceX that referenced this pull request Apr 21, 2026
Pulls 55 upstream commits published on SemiAnalysisAI/InferenceX:main
since PR SemiAnalysisAI#1032 was opened. Zero conflicts; none touch tools/ or
datasets/isb1/. Purpose: modernize PR base before Cam review and
absorb upstream fork-drift reductions.

Notable upstream work picked up:
- MiniMax M2.5 MXFP4 MI355X + B300 configs
- GLM5.1 FP4 MI355X support
- GPT-OSS FP4 TP=8 conc=1 extension (SemiAnalysisAI#1096)
- H200 multinode evals (SemiAnalysisAI#1000)
- B300 configs for Kimi K2.5, DSR1, Qwen3.5
- Parallel random data generation (SemiAnalysisAI#1094)
- KNOWN_LIMITATION.md updates

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant