tianshou
tianshou copied to clipboard
ReplayBuffer.update does not change stats while adding data
- [X] I have marked all applicable categories:
- [ ] exception-raising bug
- [X] RL algorithm bug
- [ ] documentation request (i.e. "X is missing from the documentation.")
- [ ] new feature request
- [X] I have visited the source website
- [X] I have searched through the issue tracker for duplicates
- [ ] I have mentioned version numbers, operating system and environment, where applicable:
import tianshou, torch, numpy, sys print(tianshou.__version__, torch.__version__, numpy.__version__, sys.version, sys.platform)
Are any algorithms using ReplayBuffer.update method, or it's just a legacy? It doesn't seem to keep track of the statististics (ep_rew
, ep_len
etc.) while adding data.
Just a legacy. It's because before version 0.4, tianshou uses the following pipeline to collect data:
[main_buffer] + [list of cached buffer for storing episode]
once an episode (say, ith env) finishes, it moves data from cache_buffer[i] to main_buffer via .update()