feat: add complete optimizer docs#3017
Conversation
📝 WalkthroughWalkthroughThe documentation was updated to extensively expand and restructure the optimizers section, providing a comprehensive overview of supported and custom optimizers, their references, and usage examples. Additionally, the sidebar configuration was adjusted to move the optimizers documentation to the "Core Concepts" section. Deprecated custom optimizers Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
📖 Documentation Preview: https://6892e347a1dafd12f836642c--resonant-treacle-0fd729.netlify.app Deployed on Netlify from commit 6ae853d |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/optimizers.qmd (1)
10-54: Hard-coded optimizer list is brittle – generate it during doc buildManually copying 40+ names will drift as soon as HF adds/renames an entry (and typos slip in – see the next comment).
Recommend replacing the static list with a Quarto/Python code-chunk that importstransformersand printsOptimizerNames.list(), so the page always reflects the library version used in CI.-Here is a list of optimizers supported by transformers as of `v4.54.0`: - -<long manual list> +```{python} +from transformers.training_args import OptimizerNames +for name in OptimizerNames.list(): + print(f"- `{name}`") +``` + +*(Rendered automatically from the installed `transformers` package.)*
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
_quarto.yml(1 hunks)docs/optimizers.qmd(1 hunks)
🔇 Additional comments (3)
_quarto.yml (1)
271-278: Relocation looks good – verify sidebar de-duplication elsewhere
docs/optimizers.qmdis now under “Core Concepts” and no longer appears in “Advanced Features”, which keeps the sidebar coherent.
Just double-check that no other sidebar subsection (e.g. “How To Guides”) still references the same file to avoid duplicate nav entries.docs/optimizers.qmd (2)
21-33: Potential typos in optimizer names – please cross-check
ademamix,ademamix_8bit,paged_ademamix_*do not exist in HF 4.54.
The actual name isadamix(and derivatives). Incorrect spelling will confuse readers when they copy/paste config snippets.
Run a quick verification againstOptimizerNames.list()and fix any mismatches.
124-127: PyTorch 2.7 reference may be prematureThe note says “Implementation written for PyTorch 2.7+”. At the time of writing, 2.7 has not been released.
Confirm the minimum version required (likely 2.2+ with DTensor) and update the doc to avoid scaring users away unnecessarily.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Description
The API docs only listed possible optimizers as
OptimizerNames, so I thought it'd be best to make a separate doc to clarify this info and also the extra kwargs for certain optims.Motivation and Context
How has this been tested?
Screenshots (if appropriate)
Types of changes
Social Handles (Optional)
Summary by CodeRabbit