[Feature Request] CheckpointCallback
should also save replay buffer
#1016
Labels
enhancement
New feature or request
CheckpointCallback
should also save replay buffer
#1016
Important Note: We do not do technical support, nor consulting and don't answer personal questions per email.
Please post your question on the RL Discord, Reddit or Stack Overflow in that case.
🚀 Feature
CheckpointCallback
should also callmodel.save_replay_buffer(...)
when it is applicable to do so.Motivation
The primary motivation for using the
CheckpointCallback
is to save the trained model periodically to be able to resume training if something goes wrong, or to continue training for better convergence. But, in the context of most off-policy RL algorithms, if the replay buffer isn't also saved, there is a significant lack of continuity in training performance (see #326).Pitch
The
CheckpointCallback._on_step
method needs to add something like the following after the linked line (modulo some changes to__init__
to get a suffix for the replay buffer):Alternatives
The alternative is to have the users define their own
CheckpointCallback
that does this (as I am doing now) but I thought it made sense to have this feature default in the library.### Checklist
The text was updated successfully, but these errors were encountered: