Repository navigation
docs: fix docstring args that don't match their signatures - #2061
Open
ishtiaq-ahmed-dev wants to merge 1 commit into
Open
ishtiaq-ahmed-dev wants to merge 1 commit into
ishtiaq-ahmed-dev wants to merge 1 commit into
Conversation
TrainConfig documented a wandb_project field; the field is wandb_project_name, so TrainConfig(wandb_project=...) raises TypeError. Also complete the truncated max_grad_norm description, drop a stray comma after save_dir, use the real parameter name in BloomArchitectureAdapter. split_qkv_matrix, and describe what ParamProcessingConversion.convert and revert actually take and return (a tensor, not a modified state dict).
Author
|
The "Full Code Coverage Test" failure looks unrelated to this change: the job ended after ~66 min with "The hosted runner lost communication with the server" before the test step reported a result, and this PR only touches docstrings. All other checks pass. Could someone with access re-run that job when convenient? Thanks! |
This branch has not been deployed
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A few docstrings on
devdescribe arguments their functions don't have:TrainConfig(transformer_lens/tools/training.py) documents awandb_projectfield, but the field iswandb_project_name, so following the docstring fails:max_grad_normdescription ("Maximum gradient norm to use for") and a stray comma insave_dir,. Fixed all three.BloomArchitectureAdapter.split_qkv_matrixdocumentedattention_component; the parameter isoriginal_attention_component(the NeoX and JointQKV versions already use the right name).ParamProcessingConversion.revertdocumentedstate_dict/current_keyand said it returns a modified state dict; it takes atensorand returns the reverted tensor.convertalso said it "stores result at current_key" and returns a modified state dict, while it returns the converted tensor and doesn't write to the dict.Docstrings only, no behaviour change. This follows the same pattern as #2030 for the remaining hits.
Type of change
Checklist:
What I ran (Python 3.12, Windows 11):
TypeErrorabove and checkedTrainConfig(..., wandb_project_name="demo")works; imported the three touched modules.black --check(23.12.1, the version inuv.lock) andisort --check-only(5.8.0) on the changed files: clean.astscan comparing documentedArgs:names with each function's signature overtransformer_lens/: no mismatches left apart from*args/**kwargsentries.