Add loss functions page#858
Conversation
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughSummaryAdds documentation for training loss configuration and links the new guide from the user guide navigation and quick links. ChangesLoss Functions Documentation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews
🔴 Require approval from approved reviewers listWaiting for any of
This rule is failing.All pull requests must have at least one approving review from a member of the approved reviewers list before merging.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/user_guide/loss_functions.md`:
- Line 33: Update the weighted-loss documentation near the compound_loss
description to state that each `{name}_loss` log records the unweighted
component loss, while weights apply only to the aggregate result. Also clarify
that resolve_loss_config uses weights exactly as provided and does not normalize
them.
- Line 23: Update the documentation statement describing fused Triton kernel
support for tv and nla to mention only CUDA tensors when the kernel is
importable, and describe eager PyTorch as the fallback; remove the unverified
ROCm claim.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ccee897a-53c9-4b42-8d5e-e972a1369185
📒 Files selected for processing (3)
docs/.nav.ymldocs/user_guide/index.mddocs/user_guide/loss_functions.md
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Purpose
--loss-fnaccepts seven losses and JSON weighted combinations, but nothing in the docs explains what they optimize or when to pick one. Adds a User Guide page, sourced fromsrc/speculators/models/metrics.py.kl_div(default),rkl,jsd,ce,tv,nla,lk_hybridtv/nladocs/.nav.ymland the User Guide indexTests
Docs-only.
mdformat --checkpasses.Checklist
I have filled in: