Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not use Trainer.test() if train and val dataloaders are not defined #1857

Closed
Varal7 opened this issue May 16, 2020 · 3 comments 路 Fixed by #1858
Closed

Can not use Trainer.test() if train and val dataloaders are not defined #1857

Varal7 opened this issue May 16, 2020 · 3 comments 路 Fixed by #1858
Labels
bug Something isn't working help wanted Open to be worked on

Comments

@Varal7
Copy link
Contributor

Varal7 commented May 16, 2020

馃悰 Bug

When the model does not define train_dataloader and no val_dataloader, we can not use trainer.test(model, test_dataloaders=test_dl).
The configuration checks fail with a MisconfigurationException.

Code sample

model = ...  # a model with no `train_dataloader`, `val_dataloader` defined
test_dl = ... # a dataloader
trainer = pl.Trainer()
trainer.test(model, test_dataloaders=test_dl)

Expected behavior

We expect the testing loop to execute.

@Varal7 Varal7 added bug Something isn't working help wanted Open to be worked on labels May 16, 2020
@github-actions
Copy link
Contributor

Hi! thanks for your contribution!, great first issue!

Varal7 added a commit to Varal7/pytorch-lightning that referenced this issue May 16, 2020
@Varal7
Copy link
Contributor Author

Varal7 commented May 17, 2020

Whoops, sorry I tried searching for the issue / PR but couldn't find the relevant ones. Looks like there are already good ideas in #1804, #1720, #1754, #1804.

@williamFalcon
Copy link
Contributor

Fixed in #1804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants