Repository navigation
[OMNIML-6082] [1/3] Let a reverse conversion record a merge rule no key matched #3100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[SUGGESTION] The deferral covers only the zero-groups case; a partially present group still raises unconditionally at the
missingcheck just below (line ~237), and that failure is equally rank-dependent.revert_weight_conversion_quant_aware's new docstring states the precondition — "astate_dictthat holds one rank's share of the model, with each merge group whole on one rank" — but nothing enforces it. A writer that shards by individual tensor rather than by module would putq_proj.weightandk_proj.weighton different ranks; each of those ranks then has a non-emptygroupswithmissingnon-empty and raisesQuantConversionUnsupportedError, while a rank holding none of the three records a message and returns normally. Since this exception is the project's designated "fall back to legacy" signal, those ranks would take different paths — and divergent paths in a distributed export are a hang rather than a clean error (per the distributed guidance in CLAUDE.md: every rank must issue the same collectives in the same order).Not blocking here — the behavior change is opt-in and the default path is unchanged. But since the invariant lives only in a docstring and is satisfied purely by [3/3]'s sharding choice, consider either (a) asserting it where the per-rank share is constructed in [2/3]/[3/3], or (b) routing the
missingrefusal throughunmatchedtoo, so a rule's outcome is always collective rather than sometimes raised and sometimes recorded. Saying which you intend in [3/3]'s description would make the series easier to review.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The precondition is upheld in [2/3] and [3/3], and a partial group's refusal is collective there.
_merge_groupslists each merge rule's group, with its weights' quantization state, from the same rules the reverse uses. [2/3]'s_materialize_ownedputs each group, and any group it shares a key with, on one owner, and refuses on every rank if the ranks group the keys differently. So each group is whole on one rank, and no rank sees part of one._revert_whole_sdruns the reverse inside the failure-carryingall_reduce. An exception on any rank, thismissingrefusal included, makes every rank keep its in-memory names together, so no rank takes a different collective path.Recording a partial group instead of raising it would be wrong: no rank can complete a split group, so the refusal is real. [3/3]'s description now says this.