-
Notifications
You must be signed in to change notification settings - Fork 323
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
Refactor Vision DataModules #400
Refactor Vision DataModules #400
Conversation
Codecov Report
@@ Coverage Diff @@
## master #400 +/- ##
=======================================
Coverage 80.40% 80.40%
=======================================
Files 101 101
Lines 5685 5685
=======================================
Hits 4571 4571
Misses 1114 1114
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
nice work 😄 . couple notes.
num_workers: int = 16, | ||
normalize: bool = False, | ||
seed: int = 42, | ||
batch_size: int = 32, |
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 like the idea of eval_batch_size
and train_batch_size
being separate
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 would break a lot of tests. Should I still do it?
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.
Let's move this change to separate PR?
in theory, how much the train and valid batch size can have an effect?
@ananyahjha93 @nateraw is it ready to go? |
Any updates? |
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.
@chris-clem It looks good to me.
@nateraw @ananyahjha93 Can you also have a look?
@chris-clem can you pls resolve conflits? |
eb01b40
to
b17a5d8
Compare
I just did it |
@chris-clem we have merged better importing with if/else instead of try/except mind pls update the PR.. |
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 we pls also add typing?
No problem, I updated the PR |
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 will implement some other comments as direct commits here
…hvision is not installed there)
@chris-clem @akihironitta I have made some more suggestions and rebased on master, mind check it... |
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.
@chris-clem @Borda The changes basically look great to me! I left some comments, so could you have a look?
Co-authored-by: Akihiro Nitta <[email protected]>
@chris-clem mind resolve conflicts and #400 (comment) |
# Conflicts: # pl_bolts/datamodules/binary_mnist_datamodule.py # pl_bolts/datamodules/cifar10_datamodule.py # pl_bolts/datamodules/fashion_mnist_datamodule.py # pl_bolts/datamodules/mnist_datamodule.py
… into feature/395_refactor-vision-dms # Conflicts: # pl_bolts/datamodules/cifar10_datamodule.py # pl_bolts/datamodules/fashion_mnist_datamodule.py # pl_bolts/datamodules/mnist_datamodule.py
… into feature/395_refactor-vision-dms
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.
@chris-clem It looks valid to me :]
What does this PR do?
As proposed in #395, this PR creates a
BaseDataModule
, that can be used as the parent class for several existing DataModules likeBinaryMNISTDataModule
,CIFAR10DataModule
,FashionMNISTDataModule
, andMNISTDataModule
.This removes duplicate code in the DataModules and thus makes maintaining them easier.
Fixes #395
Before submitting
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?
Make sure you had fun coding 🙃