Skip to content

docs: fix parameter names and a ghost entry in docstrings#4076

Open
DaoyuanLi2816 wants to merge 1 commit into
huggingface:mainfrom
DaoyuanLi2816:docs/fix-docstring-param-names
Open

docs: fix parameter names and a ghost entry in docstrings#4076
DaoyuanLi2816 wants to merge 1 commit into
huggingface:mainfrom
DaoyuanLi2816:docs/fix-docstring-param-names

Conversation

@DaoyuanLi2816

Copy link
Copy Markdown

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:

Location Problem Fix
DeepSpeedPlugin entry spelled msasmp_opt_level msamp_opt_level (the actual field)
MegatronLMPlugin entry spelled use_distributed_optimizr use_distributed_optimizer
Accelerator.gather_for_metrics Args entry says input; the parameter is input_data (the prose above already uses the correct name) rename entry
named_module_tensors entry says include_buffer; the parameter is include_buffers (the remove_non_persistent description below already spells it correctly); the recurse entry also has malformed `*optional`` markup rename entry + fix markup
get_mixed_precision_context_manager documents a cache_enabled parameter; the signature is (native_amp, autocast_kwargs) — no such parameter drop the ghost entry

Docstring-only; +5 / −7 across 3 files, no behavior change.

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.
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.

1 participant