Commit 8c6698e
authored
Delete stub forward() method in Module
The current stub breaks TorchScript/`to_torchscript` with:
```
otSupportedError: Compiled functions can't take variable number of arguments or use keyword-only arguments with defaults:
File "/opt/conda/envs/image-gen/lib/python3.11/site-packages/pytorch_lightning/core/module.py", line 657
def forward(self, *args: Any, **kwargs: Any) -> Any:
~~~~~~~ <--- HERE
r"""Same as :meth:`torch.nn.Module.forward`.
```
This becomes an issue when you use a module as container for other modules with bespoke methods and do not rely on the default forward call.1 parent 28a8023 commit 8c6698e
1 file changed
+0
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | 679 | | |
694 | 680 | | |
695 | 681 | | |
| |||
0 commit comments