[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
Motivation and Context / Related issue
This is a core component of #88 and #86.
How Has This Been Tested (if it applies)
I added unit tests for the iterator and the new utilities added, which check that the trajectories returned are consistent with the trajectories stored in the replay buffer.
Checklist
[x] The documentation is up-to-date with the changes I made.
[x] I have read the CONTRIBUTING document and completed the CLA (see CONTRIBUTING).
[x] All tests passed, and additional code has been covered with new tests.
Types of changes
Added an iterator class that returns sequences of transitions.
This also deprecates method
ReplayBuffer.get_iterators()
and replaces it with a utility function inmbrl.util.common
package.Motivation and Context / Related issue
This is a core component of #88 and #86.
How Has This Been Tested (if it applies)
I added unit tests for the iterator and the new utilities added, which check that the trajectories returned are consistent with the trajectories stored in the replay buffer.
Checklist