Skip to content

[doc] drop the removed config argument from the launch docstrings - #6578

Open
VenishPaneliya wants to merge 1 commit into
hpcaitech:mainfrom
VenishPaneliya:doc-launch-config
Open

VenishPaneliya wants to merge 1 commit into
hpcaitech:mainfrom
VenishPaneliya:doc-launch-config

Conversation

@VenishPaneliya

Copy link
Copy Markdown

All four launch entry points document a config argument that none of them
takes, so a reader who follows the docstring gets
TypeError: launch() got an unexpected keyword argument 'config':

launch               config (Union[str, dict, Config])  -> signature: rank, world_size, host, port, backend, local_rank, seed, verbose
launch_from_slurm    config (...)                       -> host, port, backend, seed, verbose
launch_from_openmpi  config (...)                       -> host, port, backend, seed, verbose
launch_from_torch    config (...)                       -> backend, seed, verbose

launch's summary and Raises section are stale from the same removal: there
is no parse_args() step, no global_context call and no config type to
raise on. After this change each Args section matches its signature exactly
(checked with ast: 0 documented-but-absent, 0 undocumented, for all four).

black --line-length=120 and isort --profile black are clean on the file.

Two related things I left out of this change, happy to pick either up:

  • docs/source/en/basics/launch_colossalai.md and its zh-Hans counterpart
    still say a config file "is always required" and still show
    parser = colossalai.get_default_parser(), which raises
    AttributeError: module 'colossalai' has no attribute 'get_default_parser'
    — that name only exists in the deprecated colossalai.legacy. This is what
    issue [BUG]: colossalai.get_default_parser() #5475 reported in 2024; the answer there was that users parse arguments
    themselves now, but the tutorial was never updated. Fixing it means rewriting
    prose in both languages, so it seemed better as its own change.
  • launch's backend argument is documented but overwritten by
    backend = cur_accelerator.communication_backend on the next line, so
    passing it has no effect. Whether to honour it or document it as ignored is
    a call for you rather than a docs fix.

launch, launch_from_slurm, launch_from_openmpi and launch_from_torch each
document a config argument, and launch also documents a parse_args() step,
a global_context call and an exception for a bad config type. None of that
exists any more: the four signatures take no config, so following the
docstring raises TypeError.

All four Args sections now match their signatures exactly.
@VenishPaneliya
VenishPaneliya requested a review from a team as a code owner November 27, 2026 17:25
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