fix(e2e-rag): drop the duplicated second half of QSL.py - #2673
Open
Anai-Guo wants to merge 1 commit into
Open
Conversation
e2e-rag/QSL.py is 295 lines, and lines 150-295 are a verbatim second copy of the file's own body: the Apache header, the module docstring, `class E2EQSL` and `class E2EQSLInMemory` all appear twice. Only the three imports (`os`, `pandas`, `mlperf_loadgen`) are not repeated. Source lines 26-148 and 172-294 are byte-identical, and the two `E2EQSL` / `E2EQSLInMemory` pairs have identical ASTs, so Python simply rebinds both names to the second copy and the first 124 lines of class definitions are dead. The duplication has been there since the file was added in mlcommons#2602. This removes the second copy (146 lines, no additions). The module keeps the same two classes with the same bodies, so behaviour is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
MLCommons CLA bot: |
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.
Problem
e2e-rag/QSL.pyis 295 lines, and lines 150-295 are a verbatim second copy of thefile's own body — the Apache header, the module docstring,
class E2EQSLandclass E2EQSLInMemoryall appear twice. Only the three imports (os,pandas,mlperf_loadgen) are not repeated:Python executes both
classstatements, so the module-level names are rebound to thesecond copy and the first 124 lines of class definitions are dead code. The
duplication has been present since the file was added in #2602.
Verification
Source lines
26-148and172-294compare byte-identical, and each class pair has anidentical AST:
Fix
Remove the second copy — 146 lines deleted, 0 added, one file. After the change the
module still defines exactly
E2EQSLandE2EQSLInMemorywith the same bodies and thesame imports, so behaviour is unchanged:
AI-assisted (found by a duplicate-
class-definition sweep; the byte/AST comparisonabove is the check I ran before submitting).
🤖 Generated with Claude Code