rl
rl copied to clipboard
[Feature Request] Make sure that all losses work with tensorclasses and regular tensors
Motivation
We should add tests for all losses with
- [ ] tensors passed via
tensordict.nn.dispatch. This should be accompanied by an example in the docstrings of how to use the losses without tensordict. - [ ] Similarly, it should be easy to pass regular nn.Modules to the losses (eg an actor that reads an obs and outputs an action, a qvalue that reads an obs and an action and outputs a value, etc).
- [ ] We also need to check that losses work with tensorclasses. This essentially requires us to check that no
__getitem__is used forget(key), ie the latter should always be preferred. Tests should all include a tensorclass version.
hey @vmoens is this still a relevant issue? if so i can look into it this weekend
Yeah I don't think we really test that!