stable-baselines3-contrib icon indicating copy to clipboard operation
stable-baselines3-contrib copied to clipboard

[Question] rollout_buffer_class in RecurrentPPO

Open SaltyPoseidon opened this issue 7 months ago • 4 comments

❓ Question

Hello, when custom rollout will be added to Recurrent networks as in main sb3? Is there easy way to solve this problem now?

Checklist

SaltyPoseidon avatar May 05 '25 06:05 SaltyPoseidon

Hello, could you elaborate?

araffin avatar May 05 '25 07:05 araffin

I'm trying to implement this paper https://arxiv.org/pdf/2207.07467 and add LSTM-support. But they are using their custom rollout buffer.

I have implemented it in the base sb3 PPO as it supports rollout_buffer_class=None, https://stable-baselines3.readthedocs.io/en/master/modules/ppo.html#stable_baselines3.ppo.PPO

Now I'm trying to perfom this in the RecurrentPPO, but it doesn't support such features

Actually, I found such PR https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/pull/214

SaltyPoseidon avatar May 05 '25 07:05 SaltyPoseidon

Actually, I found such PR https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/pull/214

Yes, from the PR: "I decided not to add it to MaskeablePPO and RecurrentPPO since they require special rollout buffers."

Custom rollout buffers for mask PPO or LSTM PPO require additional changes, so I would recommend you to either subclass or fork SB3 contrib for your use-case.

araffin avatar May 05 '25 08:05 araffin

Thank you

SaltyPoseidon avatar May 05 '25 08:05 SaltyPoseidon