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

Updates all scripts to LARS #613

Merged
merged 13 commits into from
Apr 12, 2021
Merged

Updates all scripts to LARS #613

merged 13 commits into from
Apr 12, 2021

Conversation

ananyahjha93
Copy link
Contributor

@ananyahjha93 ananyahjha93 commented Apr 7, 2021

What does this PR do?

Updates all scripts to Optimizer class version of LARS and solves the warmup + decay indexing issue.

Fixes #609
fixes #562.

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 🙃

@github-actions github-actions bot added documentation Improvements or additions to documentation model labels Apr 7, 2021
@pep8speaks
Copy link

pep8speaks commented Apr 7, 2021

Hello @ananyahjha93! Thanks for updating this PR.

Line 43:29: W605 invalid escape sequence '\m'
Line 45:13: W605 invalid escape sequence '\e'
Line 47:55: W605 invalid escape sequence '\m'

Comment last updated at 2021-04-12 18:22:08 UTC

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #613 (06373d8) into master (9044ed1) will increase coverage by 0.24%.
The diff coverage is 41.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #613      +/-   ##
==========================================
+ Coverage   25.20%   25.44%   +0.24%     
==========================================
  Files         118      118              
  Lines        7119     7098      -21     
==========================================
+ Hits         1794     1806      +12     
+ Misses       5325     5292      -33     
Flag Coverage Δ
cpu 25.44% <41.81%> (+0.24%) ⬆️
pytest 25.44% <41.81%> (+0.24%) ⬆️

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

Impacted Files Coverage Δ
...l_bolts/models/self_supervised/byol/byol_module.py 22.34% <ø> (-0.58%) ⬇️
pl_bolts/optimizers/lr_scheduler.py 68.29% <8.33%> (-24.82%) ⬇️
...s/models/self_supervised/simsiam/simsiam_module.py 12.15% <17.64%> (-0.92%) ⬇️
...lts/models/self_supervised/simclr/simclr_module.py 13.30% <21.42%> (-0.93%) ⬇️
...l_bolts/models/self_supervised/swav/swav_module.py 10.17% <23.07%> (-0.87%) ⬇️
pl_bolts/optimizers/lars.py 65.38% <65.38%> (ø)
pl_bolts/optimizers/__init__.py 100.00% <100.00%> (ø)
pl_bolts/utils/warnings.py 68.18% <0.00%> (-31.82%) ⬇️

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 9044ed1...06373d8. Read the comment docs.

@ananyahjha93
Copy link
Contributor Author

ananyahjha93 commented Apr 7, 2021

@Borda some test from igpt model is failing!

iGPT code is still using old version of Lightning's method: return {"loss": loss, "log": logs}

I don't think this sends the metric to trainer.callback_metrics anymore which causes this assertion error to fail:

assert trainer.callback_metrics["test_loss"] < 1.7

@Borda
Copy link
Member

Borda commented Apr 8, 2021

fyi, truing to resolve the strangely failing tests in #618

@Borda Borda enabled auto-merge (squash) April 12, 2021 18:22
@Borda Borda disabled auto-merge April 12, 2021 20:14
@Borda Borda merged commit 51fe7d9 into master Apr 12, 2021
@Borda Borda deleted the update-opt branch April 12, 2021 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation model
Projects
None yet
4 participants