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

Add learning rate scheduler to BasePolicy #598

Merged
merged 6 commits into from
Apr 17, 2022

Conversation

alexnikulkov
Copy link
Contributor

  • I have marked all applicable categories:
    • exception-raising fix
    • algorithm implementation fix
    • documentation modification
    • new feature
  • I have reformatted the code using make format (required)
  • I have checked the code using make commit-checks (required)
  • If applicable, I have mentioned the relevant/related issue(s)
  • If applicable, I have listed every items in this Pull Request below

#586

The BasePolicy class gets a new optional argument which can be either a single LR scheduler or multiple LR schedulers wrapped as MultipleLRSchedulers(scheduler_1, scheduler_2, ...)

@codecov-commenter
Copy link

codecov-commenter commented Apr 17, 2022

Codecov Report

Merging #598 (86b181d) into master (6fc6857) will increase coverage by 0.03%.
The diff coverage is 77.77%.

@@            Coverage Diff             @@
##           master     #598      +/-   ##
==========================================
+ Coverage   93.51%   93.54%   +0.03%     
==========================================
  Files          66       67       +1     
  Lines        4426     4433       +7     
==========================================
+ Hits         4139     4147       +8     
+ Misses        287      286       -1     
Flag Coverage Δ
unittests 93.54% <77.77%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
tianshou/policy/imitation/base.py 100.00% <ø> (ø)
tianshou/policy/imitation/bcq.py 100.00% <ø> (ø)
tianshou/policy/imitation/cql.py 100.00% <ø> (ø)
tianshou/policy/imitation/discrete_bcq.py 98.24% <ø> (ø)
tianshou/policy/imitation/discrete_cql.py 100.00% <ø> (ø)
tianshou/policy/imitation/discrete_crr.py 93.44% <ø> (ø)
tianshou/policy/imitation/gail.py 100.00% <ø> (ø)
tianshou/policy/modelbased/icm.py 97.95% <ø> (ø)
tianshou/policy/modelbased/psrl.py 97.40% <ø> (ø)
tianshou/policy/modelfree/a2c.py 98.46% <ø> (+1.44%) ⬆️
... and 17 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@alexnikulkov alexnikulkov changed the title Lr scheduler Add learning rate scheduler to BasePolicy Apr 17, 2022
@Trinkle23897 Trinkle23897 linked an issue Apr 17, 2022 that may be closed by this pull request
8 tasks
@alexnikulkov alexnikulkov marked this pull request as ready for review April 17, 2022 04:22
@Trinkle23897 Trinkle23897 merged commit 92456cd into thu-ml:master Apr 17, 2022
@alexnikulkov alexnikulkov deleted the lr_scheduler branch April 17, 2022 17:57
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 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.

Add LR schedulers to more algorithms
4 participants