Train deberta on goemotions with asymmetric loss - #2
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Add unified pre/post-clip gradient norm logging across all trainers to ensure consistent and accurate monitoring.
Previously, gradient norm logging was inconsistent across different loss functions (BCE, Asymmetric, Combined), leading to misleadingly small or constant
grad_normvalues in the logs for some trainers. This PR introduces aBaseGradNormTrainerthat uses Accelerate'sclip_grad_norm_to reliably compute and log both pre-clip and post-clip gradient norms for all training paths, enabling fair comparison and accurate monitoring.