fix: remove dead import and redundant entry dicts in generate_sweep_configs#1095
Closed
aryanputta wants to merge 1 commit intoSemiAnalysisAI:mainfrom
Closed
Conversation
…onfigs Two dead code issues in generate_full_sweep(): 1. `from ast import For` at the top of the file — For is an AST node class that is never referenced anywhere in this module. Left over from an earlier draft. 2. In both the multinode and single-node branches, an `entry` dict was built and immediately discarded because it was unconditionally overwritten by an identical dict inside the `for runner_value` loop. Removed the outer construction and hoisted the `runners_for_entry` and `seq_len_str` assignments above the loop where they belong. Signed-off-by: Aryan Putta <aryansputta@gmail.com>
2 tasks
Oseltamivir
reviewed
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two dead code issues in
utils/matrix_logic/generate_sweep_configs.py:from ast import For—Foris an AST node class that's never referenced in this file. Left over from an earlier draft, importing it silently pulls inastfor no reason.generate_full_sweep(), anentrydict was built and immediately thrown away because the very next line starts afor runner_value in runners_for_entry:loop that rebuilds an identical dict. The outer construction was dead code — it was never validated or appended. Removed it and hoistedseq_len_str/runners_for_entryabove the loop where they belong.Test plan
python3 -c "from utils.matrix_logic.generate_sweep_configs import generate_full_sweep"— no ImportErrorpython3 -m pytest utils/matrix_logic/generate_full_sweepis identical before and after (behavior unchanged, only dead code removed)