-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Document use case of passing test dataloaders to Trainer.test() #1992
Conversation
Please note I based this off of |
docs/source/test_set.rst
Outdated
Test additional data loaders | ||
---------------------------- | ||
If no test sets were passed in to `trainer.fit()` or otherwise declared inside your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test sets can't be passed into trainer.fit
also, if they are declared in LightningModule, they get ignored and only the new dataloader(s) get used. I'm 99% sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awaelchli is right here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where? I only see val dataloaders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my mistake. In my brain, I still had the code base for old version of PTL when test_dataloaders was indeed an argument passed into .fit
: see here. But toady that is no longer the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I say that @awaelchli is correct, test set cannot be passed to .fit()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A slight reformulation would do it I think.
docs/source/test_set.rst
Outdated
trainer.test(test_dataloaders=test) | ||
|
||
You can either pass in either a single dataloader or a list of them. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can either pass in either a single dataloader or a list of them. This | |
You can pass in either a single dataloader or a list of them. This |
@authman so we can close this PR... 🦝 |
I think it would still be good to have the information to pass in dataloaders to Trainer.test |
@authman mind reformate it for |
Working on the commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, thanks for your adjustments.
* fix chlog * test for #1729 * hist * update * Document use case of passing test dataloaders to Trainer.test() (#1992) * Issue 1990 Doc patch. * Codeblock directive. * Update to reflect current state of pytorch-lightning * Final grammar cleaning. I hope these commits are squashed. * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: authman <uapatira@gmail.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* fix chlog * test for #1729 * hist * update * Document use case of passing test dataloaders to Trainer.test() (#1992) * Issue 1990 Doc patch. * Codeblock directive. * Update to reflect current state of pytorch-lightning * Final grammar cleaning. I hope these commits are squashed. * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: authman <uapatira@gmail.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Before submitting
What does this PR do?
Fixes #1990
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Always 🙃