stable-baselines3
stable-baselines3 copied to clipboard
Added a next_observations field to RolloutBufferSamples (closes #1328)
trafficstars
Description
- Added next_observations field and has_next_observation mask to type_aliases.py
- Extended generators in buffers.py to return next_observation and has_next_observation
- Added a test in test_buffers.py
Motivation and Context
Closes #1328
- [x] I have raised an issue to propose this change (required for new features and bug fixes)
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (update in the documentation)
Checklist
- [x] I've read the CONTRIBUTION guide (required)
- [x] I have updated the changelog accordingly (required).
- [ ] My change requires a change to the documentation.
- [x] I have updated the tests accordingly (required for a bug fix or a new feature).
- [ ] I have updated the documentation accordingly.
- [ ] I have opened an associated PR on the SB3-Contrib repository (if necessary)
- [ ] I have opened an associated PR on the RL-Zoo3 repository (if necessary)
- [x] I have reformatted the code using
make format(required) - [x] I have checked the codestyle using
make check-codestyleandmake lint(required)- n.b. there is an error
C901 'BaseAlgorithm.load' is too complex (19)in a file I did not modify (stable_baselines3/common/base_class.py).
- n.b. there is an error
- [ ] I have ensured
make pytestandmake typeboth pass. (required) - [ ] I have checked that the documentation builds using
make doc(required) (I have been unable to run the last three commands due to Python dependency issues, but the PR delta is very small, so I hope this is fine...) Note: You can run most of the checks usingmake commit-checks.
Note: we are using a maximum length of 127 characters per line
Duplicate of https://github.com/DLR-RM/stable-baselines3/pull/1267 (although this is a different implementation)