Remove dead import and redundant entry dicts in generate_sweep_configs#1096
Remove dead import and redundant entry dicts in generate_sweep_configs#1096Oseltamivir merged 1 commit intomainfrom
Conversation
- 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>
There was a problem hiding this comment.
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.
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>
Summary
from ast import Forimport — leftover from an earlier draft, never referencedgenerate_full_sweep()that was immediately overwritten by the identical dict inside thefor runner_valueloopseq_len_strandrunners_for_entryabove the loops where they belongBased on @aryanputta's work in #1095.
Test plan
python3 -c "from utils.matrix_logic.generate_sweep_configs import generate_full_sweep"— no ImportErrorpython3 -m pytest utils/matrix_logic/