pytorch / pytorch/rl

[Feature Request] Write tests for functorch integration

Open
#154 0 comments 0 reactions 1 assignee View on GitHub

@vmoens is already working on this.

Since Aug 29, 2022.

Tests
Dominant language
Python
Stars
3.6k
Forks
484
Avg merge
1d 1h
Merged PRs (30d)
207

Description

functorch does not play well with TensorDictModules (especially when callingvmap).
Therefore we need to functionalize the modules inside the TensorDictModule, and then build some interface between the TensorDictModule and the functional module.
For instance, TDSequence has to split the parameters according to each of the submodules etc.

We should test all of these functionalities:

  • creating FunctionalModuleWithBuffers from the TDModule OR providing FunctionalModuleWithBuffers to a TDModule upon construction
  • Nested TDModules (e.g. ProbabilisticTensorDictModule): param length, casting etc.
  • TDSequence param split
  • [upcoming feature] TDSequence param split: caching of param lengths
  • FunctionalModule and FunctionalModuleWithBuffers (some logics might break with the former)
  • vmap extension given number of input to module

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.