facebookresearch / mbrl-lib

Library for Model Based RL
MIT License
959 stars 158 forks source link

Added sequence iterator #91

Closed luisenp closed 3 years ago

luisenp commented 3 years ago

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 in mbrl.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