-
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
[feat] 1/2 Add trainer.predict #5579
Conversation
Hello @tchaton! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-01-27 15:21:22 UTC |
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.
Logic wise everything looks clear to me! Just a few nits that are not super critical :)
As mentioned, it would be nice to display predict with just dataloader
rather than test_dataloader
to differentiate that this works on any dataloader (I can pass my train dataloader for example)
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.
could somehow make the logic that test_step
is using predcit_step
?
Does predict() deal with ddp data padding from distributed samplers? |
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.
LGTM, just check the new _predition
attribute
What does this PR do?
This PR:
By calling Trainer.predict(model, dataloaders), it will call forward function and gather predictions.
Trainer
LightningModule
Accelerators
Uniformize use of RunningState across LoggerConnector, DDPWrapper, DP.
Add tests for DDP, DP, DDP_SPAWN, 1 GPU, DDP_CPU, DDP_SHARDED.
Fixes # (issue) <- this links related issue to this PR
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃