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

Fixed the unused train/val/test Mnist transforms #109

Merged
merged 3 commits into from Jul 12, 2020

Conversation

lebrice
Copy link
Contributor

@lebrice lebrice commented Jul 9, 2020

When the 'transforms' arg of the [train|val|test]_dataloader method is None,
The MNISTDataModule would use self._default_transforms(), ignoring the value
of self.[train|val|test]_transforms.

I changed this to use instead either:

  1. transform arg to xxxx_dataloader, if passed;
  2. self.xxxx_transform, if set;
  3. self._default_transforms().

Signed-off-by: Fabrice Normandin fabrice.normandin@gmail.com

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes # (issue).

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 馃檭

When the 'transforms' arg of the [train|val|test]_dataloader method is None,
The MNISTDataModule would use self._default_transforms(), ignoring the value
of `self.[train|val|test]_transforms`.

I changed this to use instead either:
1. `transform` arg to `xxxx_dataloader`
2. `self.xxxx_transform`, if available
3. `self._default_transforms()`.

Signed-off-by: Fabrice Normandin <fabrice.normandin@gmail.com>
@mergify mergify bot requested a review from Borda July 9, 2020 19:22
@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2020

Codecov Report

Merging #109 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
- Coverage   91.91%   91.90%   -0.01%     
==========================================
  Files          77       77              
  Lines        3944     3941       -3     
==========================================
- Hits         3625     3622       -3     
  Misses        319      319              
Flag Coverage 螖
#unittests 91.90% <100.00%> (-0.01%) 猬囷笍
Impacted Files Coverage 螖
pl_bolts/datamodules/mnist_datamodule.py 97.67% <100.00%> (-0.16%) 猬囷笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 024b574...e119cc4. Read the comment docs.

Signed-off-by: Fabrice Normandin <fabrice.normandin@gmail.com>
Signed-off-by: Fabrice Normandin <fabrice.normandin@gmail.com>
@Borda Borda added the enhancement New feature or request label Jul 12, 2020
@Borda Borda merged commit 54d28d2 into Lightning-Universe:master Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants