Skip to content
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

Fix FSDP ckpt by filtering User Waring #3327

Merged
merged 3 commits into from
May 25, 2024

Conversation

j316chuck
Copy link
Contributor

@j316chuck j316chuck commented May 25, 2024

What does this PR do?

Fix FSDP ckpt by filtering User Warning

What issue(s) does this change relate to?

Fix failing dailies
https://github.com/mosaicml/composer/actions/runs/9231304954

@j316chuck j316chuck requested a review from a team as a code owner May 25, 2024 00:08
This reverts commit 24f088c.
Copy link
Contributor

@snarayan21 snarayan21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@j316chuck Can you run the daily tests on this branch and see if they pass now? will approve after that

@j316chuck
Copy link
Contributor Author

j316chuck commented May 25, 2024

@j316chuck j316chuck requested a review from dakinggg May 25, 2024 00:54
@j316chuck j316chuck enabled auto-merge (squash) May 25, 2024 00:54
@j316chuck j316chuck merged commit 0be5d30 into dev May 25, 2024
28 of 29 checks passed
@j316chuck j316chuck deleted the chuck/fix_daily_ckpt_by_filtering_warnings branch May 25, 2024 02:01
@mvpatel2000
Copy link
Contributor

Hm automerge was on so it merged even though its not fixed on linked dailies...

@snarayan21
Copy link
Contributor

snarayan21 commented May 25, 2024

sad...but the error isn't related to this PR, it seems related to the TP PR @mvpatel2000

@j316chuck
Copy link
Contributor Author

j316chuck commented May 25, 2024

@mvpatel2000 I think it fixed the UserWarning but now we are hitting a new failure.

tensor = ShardedTensor(ShardedTensorMetadata(shards_metadata=[ShardMetadata(shard_offsets=[0, 0], shard_sizes=[16, 32], placeme...pe=torch.float32, layout=torch.strided, requires_grad=False, memory_format=torch.contiguous_format, pin_memory=False)))
parent_mesh = None

    def _all_gather_dtensor(
        tensor: DTensor,
        parent_mesh: Optional[DeviceMesh],
    ) -> torch.Tensor:
        """
        All gather a DTensor in its sharded dimension and return the local tensor.
        """
        assert parent_mesh is None
    
>       placements = list(copy.deepcopy(tensor.placements))
E       AttributeError: 'ShardedTensor' object has no attribute 'placements'

Let's fix in a new PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants