Repository navigation
[doc] drop the removed config argument from the launch docstrings - #6578
Open
VenishPaneliya wants to merge 1 commit into
Open
VenishPaneliya wants to merge 1 commit into
VenishPaneliya wants to merge 1 commit into
Conversation
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.
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.
All four launch entry points document a
configargument that none of themtakes, so a reader who follows the docstring gets
TypeError: launch() got an unexpected keyword argument 'config':launch's summary andRaisessection are stale from the same removal: thereis no
parse_args()step, noglobal_contextcall and no config type toraise on. After this change each
Argssection matches its signature exactly(checked with
ast: 0 documented-but-absent, 0 undocumented, for all four).black --line-length=120andisort --profile blackare clean on the file.Two related things I left out of this change, happy to pick either up:
docs/source/en/basics/launch_colossalai.mdand itszh-Hanscounterpartstill say a config file "is always required" and still show
parser = colossalai.get_default_parser(), which raisesAttributeError: module 'colossalai' has no attribute 'get_default_parser'— that name only exists in the deprecated
colossalai.legacy. This is whatissue [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'sbackendargument is documented but overwritten bybackend = cur_accelerator.communication_backendon the next line, sopassing it has no effect. Whether to honour it or document it as ignored is
a call for you rather than a docs fix.