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

Make OptimWrapper #427

Merged
merged 5 commits into from
Oct 18, 2024
Merged

Make OptimWrapper #427

merged 5 commits into from
Oct 18, 2024

Conversation

takuseno
Copy link
Owner

@takuseno takuseno commented Oct 18, 2024

This PR introduces OptimWrapper that adds pre/post update logics such as gradient clipping.

Here is an example to set gradient clipping parameter.

d3rlpy.models.AdamFactory(clip_grad_norm=10.0)

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 94.81481% with 7 lines in your changes missing coverage. Please review.

Project coverage is 91.02%. Comparing base (68527fc) to head (f5b8f27).
Report is 28 commits behind head on master.

Files with missing lines Patch % Lines
d3rlpy/algos/qlearning/torch/bear_impl.py 86.66% 2 Missing ⚠️
d3rlpy/algos/qlearning/torch/plas_impl.py 71.42% 2 Missing ⚠️
d3rlpy/algos/qlearning/torch/bc_impl.py 87.50% 1 Missing ⚠️
d3rlpy/models/optimizers.py 96.55% 1 Missing ⚠️
d3rlpy/types.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #427   +/-   ##
=======================================
  Coverage   91.01%   91.02%           
=======================================
  Files         118      118           
  Lines        8360     8390   +30     
=======================================
+ Hits         7609     7637   +28     
- Misses        751      753    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@takuseno takuseno merged commit 677802d into master Oct 18, 2024
9 checks passed
@takuseno takuseno deleted the make_optim_wrapper branch October 18, 2024 15:18
@takuseno takuseno mentioned this pull request Oct 18, 2024
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.

1 participant