-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
featureIs an improvement or enhancementIs an improvement or enhancementhelp wantedOpen to be worked onOpen to be worked onrefactor
Description
🚀 Feature
Currently. DataModule.setup is only called with stages fit or test. But we have several more:
Stages:
Note that it's a bit tricky because fit is not a RunningStage. It indicates train or eval
Motivation
Allows having custom logic for each stage
Pitch
def setup(stage: Optional[str] = None):
assert stage in list(RunningStage)
...Additional context
We are passing 'test' when predicting as seen in #5579
https://github.com/PyTorchLightning/pytorch-lightning/blob/9137b16068fe03e6db8df548235363e5f5476aac/pytorch_lightning/trainer/trainer.py#L909
Metadata
Metadata
Assignees
Labels
featureIs an improvement or enhancementIs an improvement or enhancementhelp wantedOpen to be worked onOpen to be worked onrefactor