-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime Error if validation_step is defined, but valid_loader isn't provided to Trainer #3052
Comments
Hi! thanks for your contribution!, great first issue! |
Pretty sure this will be solved by this PR #2892 automatically. But we should remember to add a test for this warning. |
i don't think #2892 will make it into 0.9 because it has a lot going on... Can we get this into 0.9.0? this will require a new PR |
The issue corresponding to #2892 has been fixed by #2917. But the code sample still got errors. It seems that the problem can be fixed by change the initial self.test_dataloaders = []
self.val_dataloaders = [] Should a new issue be created? |
@manipopopo I cannot reproduce it on master. What exactly is the remaining issue, how do I reproduce it? |
The code in your google colab link now runs without the reported error if I install from master branch. Closing this. |
Hi @awaelchli , the issue has been fixed by #3197 . |
🐛 Bug
If
validation_step
is defined in yourLightningModule
, the model will not train unless you provide a validation loader to the trainer.You get this warning (as expected):
But then this error, which prevents training:
To Reproduce
validation_step
Train.fit()
with only training loader.Code sample
https://colab.research.google.com/drive/1-pyGmHMAJaIg86T7s4y2PKxOX79dZq91?usp=sharing
Expected behavior
Should still give user warning, but should train, skipping the validation step.
The text was updated successfully, but these errors were encountered: