jaxtyping
jaxtyping copied to clipboard
TorchScript compatibility
Hi,
The package now does not require JAX but can also work with torch.Tensor I was trying this, and it worked fine, but it fails when using torch.jit.script In TorchTyping you fixed it with https://github.com/patrick-kidger/torchtyping/issues/13 Is there something similar here?
Interesting point! Supportig this is definitely a non-goal for jaxtyping, although I'd be happy to accept PRs if something needs tweaking to enable torchscript compatibility.
For what it's worth, my impression is that TorchScript is going to be deprecated at some point in favour of PyTorch 2's new compiler offerings (TorchDynamo etc.)