Skip to content

Conversation

aadyotb
Copy link
Contributor

@aadyotb aadyotb commented Aug 29, 2025

What does this PR do?

This PR fixes a bug with the OptimizerMonitor being used in conjunction with FSDP2. Specifically, FSDP2 causes some of the optimizer metrics to be DTensor objects, which have issues being all-reduced. This PR converts the DTensors to local tensors before doing any further operations.

What issue(s) does this change relate to?

Fixes #3920

Before submitting

  • Have you read the contributor guidelines?
  • Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

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.

OptimizerMonitor Error with FSDP2
1 participant