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

Refactor pl_bolts.models.self_supervised.amdim #479

Merged

Conversation

akihironitta
Copy link
Contributor

@akihironitta akihironitta commented Dec 24, 2020

What does this PR do?

This PR is a follow-up PR of #338 and #477, refactors the submodule, and doesn't change any behaviour of the submodule. (I'm making this PR small intentionally in order to make it easy for us to review and keep the tests passing.)

Description of the changes

  • remove except/try in pl_bolts/models/self_supervised/__init__.py
  • use _*_AVAILABLE for optional import statements

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 your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

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 🙃

@codecov
Copy link

codecov bot commented Dec 24, 2020

Codecov Report

Merging #479 (158503c) into master (a72766c) will increase coverage by 0.46%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #479      +/-   ##
==========================================
+ Coverage   80.52%   80.98%   +0.46%     
==========================================
  Files         103      103              
  Lines        5710     5718       +8     
==========================================
+ Hits         4598     4631      +33     
+ Misses       1112     1087      -25     
Flag Coverage Δ
cpu 25.62% <41.66%> (+0.26%) ⬆️
pytest 25.62% <41.66%> (+0.26%) ⬆️
unittests 80.50% <54.16%> (+0.41%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...l_bolts/models/self_supervised/amdim/transforms.py 94.04% <54.54%> (-5.96%) ⬇️
pl_bolts/models/self_supervised/amdim/datasets.py 57.62% <60.00%> (-3.49%) ⬇️
pl_bolts/models/self_supervised/amdim/__init__.py 100.00% <100.00%> (+20.00%) ⬆️
...bolts/models/self_supervised/amdim/amdim_module.py 96.73% <100.00%> (+0.99%) ⬆️
pl_bolts/datasets/ssl_amdim_datasets.py 77.02% <0.00%> (+2.70%) ⬆️
pl_bolts/datasets/base_dataset.py 95.45% <0.00%> (+13.63%) ⬆️
pl_bolts/datasets/cifar10_dataset.py 97.82% <0.00%> (+26.08%) ⬆️

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 a72766c...158503c. Read the comment docs.

@akihironitta akihironitta marked this pull request as ready for review December 24, 2020 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants