FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(optim): mark unused amsgrad/optim_bits as deprecated in 8-bit Adam classes by kritikagarg · Pull Request #2063 · bitsandbytes-foundation/bitsandbytes · GitHub

fix(optim): mark unused amsgrad/optim_bits as deprecated in 8-bit Adam classes - #2063

Open
kritikagarg wants to merge 1 commit into
bitsandbytes-foundation:mainfrom
kritikagarg:fix/adam8bit-deprecated-params-docs
Open

fix(optim): mark unused amsgrad/optim_bits as deprecated in 8-bit Adam classes#2063
kritikagarg wants to merge 1 commit into
bitsandbytes-foundation:mainfrom
kritikagarg:fix/adam8bit-deprecated-params-docs

Conversation

Copy link
Copy Markdown

Summary

  • Replace misleading "Note:" docstring entries with proper .. deprecated:: Sphinx directives in Adam8bit, PagedAdam8bit, AdamW8bit, and PagedAdamW8bit
  • Add test coverage for Adam8bit/AdamW8bit parameter validation guards (previously only LAMB8bit and Adagrad8bit had guard tests)

What's the problem?

The amsgrad and optim_bits parameters in the 8-bit Adam optimizer classes have docstrings that describe them as functional parameters with a small "Note:" afterthought. This is misleading — these params exist only for signature compatibility with the base Adam/AdamW classes and are completely non-functional (hardcoded to 8-bit, amsgrad raises ValueError).

Changes

  • Docstrings: Replaced informal "Note:" entries with proper .. deprecated:: directives that clearly communicate these params will be removed in a future version
  • Tests: Added test_adam8bit_rejects_amsgrad, test_adam8bit_rejects_non_default_optim_bits, test_adamw8bit_rejects_amsgrad, test_adamw8bit_rejects_non_default_optim_bits

No breaking changes — params remain in the signature for backwards compatibility.

Fixes #1261

…bit Adam classes

Replace misleading "Note:" docstring entries with proper `.. deprecated::`
Sphinx directives in Adam8bit, PagedAdam8bit, AdamW8bit, and PagedAdamW8bit.
These parameters exist only for signature compatibility with the base Adam/AdamW
classes and will be removed in a future version.

Add test coverage for the Adam8bit/AdamW8bit parameter validation guards
which previously only existed for LAMB8bit and Adagrad8bit.

Fixes bitsandbytes-foundation#1261
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong doc and function signature for 8-bit optim

1 participant


Back | FazBrowse Home | New Git URL