You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of <subcommand> --help is populated with all known subclasses based on the docstring's type hints. As it can be seen in the following MWE, this can span multiple lines/pages in a terminal which IMHO limits readability.
It would be great if this output for subclasses could somehow be suppressed (either partially or completely).
# main.pyimportlightningasLimporttorchfromlightning.pytorch.cliimportLightningCLIclassLitModel(L.LightningModule):
def__init__(self, model: torch.nn.Module):
super().__init__()
self.model=modeldefforward(self, x):
returnself.model(x)
defconfigure_optimizers(self):
returntorch.optim.Adam(self.parameters())
defcli_main():
returnLightningCLI(LitModel)
defcli_main():
cli=LightningCLI(LitModel)
# note: don't call fit!!if__name__=="__main__":
cli_main()
# note: it is good practice to implement the CLI in a function and call it in the main if block
Description & Motivation
The output of
<subcommand> --help
is populated with all known subclasses based on the docstring's type hints. As it can be seen in the following MWE, this can span multiple lines/pages in a terminal which IMHO limits readability.It would be great if this output for subclasses could somehow be suppressed (either partially or completely).
And the output is:
Pitch
No response
Alternatives
No response
Additional context
No response
cc @lantiga @Borda
The text was updated successfully, but these errors were encountered: