rl
rl copied to clipboard
A modular, primitive-first, python-first PyTorch library for Reinforcement Learning.
## Motivation ### 1. Consistent style for `torch.nn.modules.loss.*Loss` In `torch.nn.modules.loss`, there are many `*Loss` subclassing `nn.Module`. The `Loss.__init__()` does not takes other `nn.Module`'s as arguments. And method `Loss.forward()` method is...
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #2673 * __->__ #2623
Hello, PyTorch recently added support for Python 3.13t, aka "no-gil" Python (https://github.com/pytorch/pytorch/issues/130249). Are there any plans to make TorchRL usable from this version? It would be nice if this could...
## Describe the bug I am trying to integrate torch geometric layers into my policy network and I think I am running into a variant of https://github.com/pytorch/rl/issues/1613 ## To Reproduce...
## Description Describe your changes in detail. ## Motivation and Context Why is this change required? What problem does it solve? If it fixes an open issue, please link to...
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #2673 * #2623
## Describe the bug When yielding from a `SyncDataCollector` that uses a standard `Actor` (not a random policy) and `init_random_frames=0`, it crashes. ```python policy = Actor( agent, in_keys=["your_key"], out_keys=["action"], spec=train_env.action_spec,...
## Describe the bug The class `MultiOneHot(OneHot)` defined at torchrl\data\tensor_specs.py **uses the "to_numpy" method from the OneHot class.** The method "to_numpy" from the OneHot class do not support translating multione...
## Description Describe your changes in detail. ## Motivation and Context Why is this change required? What problem does it solve? If it fixes an open issue, please link to...
## Motivation The `ActionDiscretizer` only gives the option of converting the `input_spec["full_action_spec"]` to `MultiCategorical` or `MultiOneHot`. This introduces a dimension into the shape: ``` MultiCategorical( shape=torch.Size([1]), space=BoxList(boxes=[CategoricalBox(n=4)]), dtype=torch.int64, domain=discrete) ```...