这是indexloc提供的服务,不要输入任何密码
Skip to content

update save_fn in trainer #459

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

Merged
merged 8 commits into from
Oct 13, 2021
Merged

Conversation

Trinkle23897
Copy link
Collaborator

@Trinkle23897 Trinkle23897 commented Oct 4, 2021

  1. collector.collect() now returns 4 extra keys: rew/rew_std/len/len_std (previously this work is done in logger)
  2. save_fn() will be called at the beginning of trainer

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2021

Codecov Report

Merging #459 (3e0425e) into master (e45e209) will decrease coverage by 0.03%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #459      +/-   ##
==========================================
- Coverage   94.13%   94.10%   -0.04%     
==========================================
  Files          60       60              
  Lines        3871     3883      +12     
==========================================
+ Hits         3644     3654      +10     
- Misses        227      229       +2     
Flag Coverage Δ
unittests 94.10% <90.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
tianshou/utils/logger/base.py 90.69% <ø> (-0.97%) ⬇️
tianshou/trainer/onpolicy.py 95.94% <50.00%> (-1.24%) ⬇️
tianshou/data/collector.py 95.56% <100.00%> (+0.10%) ⬆️
tianshou/policy/modelfree/ppo.py 91.42% <100.00%> (+0.25%) ⬆️
tianshou/trainer/offline.py 100.00% <100.00%> (ø)
tianshou/trainer/offpolicy.py 100.00% <100.00%> (ø)
tianshou/trainer/utils.py 100.00% <100.00%> (ø)
tianshou/policy/modelfree/npg.py 97.70% <0.00%> (-1.15%) ⬇️

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 e45e209...3e0425e. Read the comment docs.

@Trinkle23897 Trinkle23897 changed the title update save_fn and stop_fn in trainer update save_fn in trainer Oct 13, 2021
@Trinkle23897 Trinkle23897 merged commit 926ec0b into thu-ml:master Oct 13, 2021
@Trinkle23897 Trinkle23897 deleted the update-fn branch October 13, 2021 13:25
@Trinkle23897 Trinkle23897 mentioned this pull request Nov 18, 2021
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
- collector.collect() now returns 4 extra keys: rew/rew_std/len/len_std (previously this work is done in logger)
- save_fn() will be called at the beginning of trainer
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.

save_fn should always save at least one policy Stopping function on alternative criteria
2 participants