docs: fix parameter names and a ghost entry in docstrings#4076
Open
DaoyuanLi2816 wants to merge 1 commit into
Open
docs: fix parameter names and a ghost entry in docstrings#4076DaoyuanLi2816 wants to merge 1 commit into
DaoyuanLi2816 wants to merge 1 commit into
Conversation
Five docstring fixes where the Args sections drifted from the actual signatures: - DeepSpeedPlugin: the entry was spelled msasmp_opt_level; the field is msamp_opt_level. - MegatronLMPlugin: the entry was spelled use_distributed_optimizr; the field is use_distributed_optimizer. - Accelerator.gather_for_metrics: the entry says input; the parameter is input_data (the prose above already uses the correct name). - named_module_tensors: the entry says include_buffer; the parameter is include_buffers (the remove_non_persistent description below already uses the correct name). Also fixes the malformed *optional` markup on the recurse entry. - get_mixed_precision_context_manager: drops the cache_enabled entry — the function's signature is (native_amp, autocast_kwargs); no such parameter exists.
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.
What does this PR do?
Audits docstring Args sections against the actual signatures/fields and fixes five drifts. These docstrings feed the rendered API reference, so the wrong names are what users see:
DeepSpeedPluginmsasmp_opt_levelmsamp_opt_level(the actual field)MegatronLMPluginuse_distributed_optimizruse_distributed_optimizerAccelerator.gather_for_metricsinput; the parameter isinput_data(the prose above already uses the correct name)named_module_tensorsinclude_buffer; the parameter isinclude_buffers(theremove_non_persistentdescription below already spells it correctly); therecurseentry also has malformed `*optional`` markupget_mixed_precision_context_managercache_enabledparameter; the signature is(native_amp, autocast_kwargs)— no such parameterDocstring-only; +5 / −7 across 3 files, no behavior change.