Fix asymmetric loss gradient disconnection - #3
Conversation
Co-authored-by: denizcan.uelker <denizcan.uelker@mercedes-benz.com>
|
Cursor Agent can help with this pull request. Just |
There was a problem hiding this comment.
Hi @uelkerd! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Co-authored-by: denizcan.uelker <denizcan.uelker@mercedes-benz.com>
Co-authored-by: denizcan.uelker <denizcan.uelker@mercedes-benz.com>
Implement robust training monitoring and fix Asymmetric Loss gradient disconnection to prevent unexpected training stalls.
The previous Asymmetric Loss implementation used
disable_torch_grad_focal_loss=True, which inadvertently created atorch.no_grad()context, blocking gradient flow and preventing the model from learning. This PR corrects the loss function and introduces aProgressMonitorCallbackto detect training stalls, manage disk space, and improve NCCL communication, ensuring more reliable and recoverable multi-GPU training runs.