Skip to content

Conversation

@prajjwal1
Copy link
Contributor

Summary:
PyTorch's detect_anomaly() context is needed to catch NaN gradients
When using detect_anomaly(), PyTorch raises errors with its own message format ("returned nan values"), not the DebugEmbedding* format ("NaN/Inf detected in gradient entering")

Differential Revision: D89752392

Summary:
PyTorch's detect_anomaly() context is needed to catch NaN gradients
When using detect_anomaly(), PyTorch raises errors with its own message format ("returned nan values"), not the DebugEmbedding* format ("NaN/Inf detected in gradient entering")

Differential Revision: D89752392
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Dec 24, 2025

@prajjwal1 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89752392.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 24, 2025
@meta-codesync meta-codesync bot closed this in 719eee1 Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant