fix docs rendering in datamodule (#7064)

* [docs]: add newline to correctly render Example

* whitespace

Co-authored-by: Matthew Sarmiento <matthewcs@me.com>
This commit is contained in:
Adrian Wälchli 2021-04-19 16:08:09 +02:00 committed by GitHub
parent a5e356adb1
commit 2b232d3fbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -58,7 +58,7 @@ def track_data_hook_calls(fn):
- When ``dm.prepare_data()`` is called, ``dm.has_prepared_data`` gets set to True
- When ``dm.setup()``, ``dm.has_setup_{fit,validate,test}`` get set to True
- When ``dm.setup(stage)`` is called, where stage is any of ``{fit,validate,test,predict}``.
Its corresponding `dm_has_setup_{stage}` attribute gets set to True
Its corresponding `dm_has_setup_{stage}` attribute gets set to True
- ``dm.teardown()`` and ``dm.teardown(stage)`` act exactly like ``dm.setup``
Args:
@ -319,11 +319,12 @@ class LightningDataModule(CheckpointHooks, DataHooks, metaclass=_DataModuleWrapp
Args:
args: The parser or namespace to take arguments from. Only known arguments will be
parsed and passed to the :class:`LightningDataModule`.
parsed and passed to the :class:`LightningDataModule`.
**kwargs: Additional keyword arguments that may override ones in the parser or namespace.
These must be valid DataModule arguments.
These must be valid DataModule arguments.
Example::
parser = ArgumentParser(add_help=False)
parser = LightningDataModule.add_argparse_args(parser)
module = LightningDataModule.from_argparse_args(args)