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

Added Sparse/Lazy Adam optimizer #2493

Merged
merged 7 commits into from
May 5, 2021
Merged

Added Sparse/Lazy Adam optimizer #2493

merged 7 commits into from
May 5, 2021

Conversation

atreyamaj
Copy link
Contributor

@atreyamaj atreyamaj commented Apr 20, 2021

Description

Added the Sparse Adam optimizer, also known as the Lazy Adam optimizer.

Referencing #2478

This change requires the Tensorflow Addons dependency, which is an official extension of the Tensorflow library. This PR is intended to be merged after #2488

Type of change

Please check the option that is related to your PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • In this case, we recommend to discuss your modification on GitHub issues before creating the PR
  • Documentations (modification for documents)

All tests for test_optimizers.py are passing.

Screenshot from 2021-04-20 19-37-31

The warnings seem to be unrelated to the added code.

Checklist

  • My code follows the style guidelines of this project
    • Run yapf -i <modified file> and check no errors (yapf version must be 0.22.0)
    • Run mypy -p deepchem and check no errors
    • Run flake8 <modified file> --count and check no errors
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@rbharath @alat-rights @peastman @ncfrey

P.S. I have made this PR a draft PR at the moment. If the addition of TF_Addons is alright, I will change it to an Open PR.

@atreyamaj atreyamaj marked this pull request as draft April 20, 2021 14:09
@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2021

Codecov Report

Merging #2493 (a3df318) into master (dd8665e) will increase coverage by 0.00%.
The diff coverage is 88.23%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2493   +/-   ##
=======================================
  Coverage   85.77%   85.78%           
=======================================
  Files         309      309           
  Lines       27454    27488   +34     
=======================================
+ Hits        23550    23580   +30     
- Misses       3904     3908    +4     
Impacted Files Coverage Δ
deepchem/models/tests/test_optimizers.py 94.05% <86.66%> (-1.29%) ⬇️
deepchem/models/optimizers.py 91.27% <89.47%> (-0.27%) ⬇️

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 dd8665e...a3df318. Read the comment docs.

Copy link
Member

@rbharath rbharath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good on my end! Might be good to have @peastman take a quick look as well since he's been reviewing the other optimizer PRs

@rbharath
Copy link
Member

Ah my bad, sorry just noticed this is a WIP. Let me know when this is ready to review!

@atreyamaj atreyamaj marked this pull request as ready for review April 21, 2021 04:30
@atreyamaj
Copy link
Contributor Author

atreyamaj commented Apr 21, 2021

Ah my bad, sorry just noticed this is a WIP. Let me know when this is ready to review!

@rbharath It should be ready to review 😅

I marked it as a draft due to the additional dependency temporarily.

I'll go ahead and mark it open for review now.

@peastman
Copy link
Contributor

Looks good!

@peastman
Copy link
Contributor

Except yapf is complaining. Can you run it on test_optimizers.py?

@atreyamaj
Copy link
Contributor Author

Except yapf is complaining. Can you run it on test_optimizers.py?

Sorry about that, I've committed the YAPF reformatting. @peastman

@rbharath
Copy link
Member

rbharath commented May 5, 2021

Going to go ahead and merge in!

@rbharath rbharath merged commit eac8e47 into deepchem:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants