Skip to content

Commit

Permalink
added stage param to LightningDataModule.setup example (#7483)
Browse files Browse the repository at this point in the history
Co-authored-by: Sileadim <christopher@omnius.com>
  • Loading branch information
Sileadim and Sileadim authored May 11, 2021
1 parent 8538c1f commit b9a52fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/core/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self):
def prepare_data(self):
# download, split, etc...
# only called on 1 GPU/TPU in distributed
def setup(self):
def setup(self, stage):
# make assignments here (val/train/test split)
# called on every process in DDP
def train_dataloader(self):
Expand Down

0 comments on commit b9a52fa

Please sign in to comment.