pytorch / rl

A modular, primitive-first, python-first PyTorch library for Reinforcement Learning.
https://pytorch.org/rl
MIT License
2.27k stars 302 forks source link

[BUG] Collector `set_truncated` overwrites environement done #2329

Closed matteobettini closed 2 months ago

matteobettini commented 2 months ago

https://github.com/pytorch/rl/blob/0063741839a3e5e1a527947945494d54f91bc629/torchrl/collectors/collectors.py#L1124

This line overwrites any done encountered in the collection. This seems like a high impact bug.

I tested it in vmas to confirm.