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’ll 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 [email protected]

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 <[email protected]>
@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.

@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.

3 participants