Repository navigation
Fix FSDP2 weight-access tests broken on main by #3091 - #3106
Closed
kevalmorabia97 wants to merge 1 commit into
Closed
kevalmorabia97 wants to merge 1 commit into
kevalmorabia97 wants to merge 1 commit into
Conversation
…cess tests #3091 made _get_fsdp2_mesh call fully_shard.state, so the window now calls it once per entry and the #3088 tests' call counts were off. Count _fsdp2_param_groups, the scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
Contributor
|
Caution Review failedThe pull request is closed. Finishing Touches
Comment |
Collaborator
Author
|
Closing: #2745 already landed the same fix on main (the tests now count |
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.
What does this PR do?
Type of change: Bug fix (tests)
Fixes the two unit tests that fail on
mainsince #3091 merged:test_fsdp2_owns_its_parameters_in_every_shard_stateandtest_fsdp2_weight_access_leaves_parameters_fsdp2_does_not_ownintests/unit/torch/quantization/test_utils.py.#3088 added these tests, which count
fully_shard.statecalls as a stand-in for "how many times the window scanned the FSDP2 unit". #3091 then switched_get_fsdp2_meshfrom the private_get_module_stateto the publicfully_shard.state, and the weight-access window calls_get_fsdp2_meshon every entry, so the counts went up by one per entry. The two PRs did not conflict textually. The tests now count_fsdp2_param_groups, the scan itself.Usage
N/A
Testing
tests/unit/torch/quantization/test_utils.pyon torch 2.10: 27 passed (both tests fail onmainbefore this change, as in itslinuxCI run).Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).CONTRIBUTING.md: N/AAdditional Information
Unblocks
linuxon #3092 and #3093.🤖 Generated with Claude Code