Closed sef43 closed 1 year ago
This particular issue seems easy to fix, in fact it is probable this #80 fixes it, since I modified the decorators and I remember they were wrong. However, I do not think it is worth spending time on jit.script, since it is basically obsolete now due to torch.compile. jit.script requires things like type annotations, something that torch.compile has engineered to avoid.
jit.script
is still used (including TorchMD-NET). So, it would be ideal if it works.
@sef43 I think, you need just fix this line to have Tuple[Tensor, Tensor, Tensor]
I tried and yout fix works, @raimis, I will PR.
Thanks!
Do we have/should we make a general pytorch 2.0 issue in this repo or openmm-torch to discuss various changes and features? the new torch.compile feature does look very useful!
Totally, I believe that is on me. I will PR soon. It will probably mostly painless (hopefully...)
I think you gave the perfect excuse to start a PR and discussion :P #94
If you use torch.compile, can you load the compiled module in C++? The documentation still only talks about loading TorchScript models.
When I
torch.jit.script
a module using getNeighbors it fails (pytorch=1.13.1, nnpops=0.4): Example:output:
Looks like it is just the type annotations.
We should add
jit.script
ing to the test cases