fix: correct model_type comparison bug, f-string typo, and bare except clauses#410
Open
Ricardo-M-L wants to merge 1 commit intobigscience-workshop:mainfrom
Open
fix: correct model_type comparison bug, f-string typo, and bare except clauses#410Ricardo-M-L wants to merge 1 commit intobigscience-workshop:mainfrom
Ricardo-M-L wants to merge 1 commit intobigscience-workshop:mainfrom
Conversation
- fix model_type comparison: `== ['MNLI', 'QQP']` always evaluates to
False because it compares a string to a list; use `in` instead
- fix f-string format: `f{out_pr}` prints literal 'f' prefix instead
of the variable value; remove the stray 'f'
- replace bare `except:` with `except Exception:` in 3 files to avoid
catching SystemExit and KeyboardInterrupt
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
tools/merge_mp_partitions.py:model_type == ['MNLI', 'QQP']compares a string to a list, which always evaluates toFalse— MNLI and QQP models can never be loaded. Changed tomodel_type in ['MNLI', 'QQP'].megatron/testing_utils.py:f"...output: f{out_pr}"prints a literalfbefore the variable. Removed the strayf.except:in 3 files: Replaced withexcept Exception:to avoid catchingSystemExitandKeyboardInterrupt.Test plan
merge_mp_partitions.py: verified theelifbranch now matches string values correctlytesting_utils.py: assert message now formats the output variable properlyexceptreplacements preserve existing error handling behavior🤖 Generated with Claude Code