New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Updated: einops does not support torch.jit.script #165
Comments
Hey, thanks for bringing up This is strange, but I can't reproduce this on mac, and I can't reproduce this on linux. Line 227 in 85dcd35
I've tested 0.3.2 and my local master I think following things should be checked:
torch.jit.script(Rearrange('b c h w -> b h w c'))
try:
torch.jit.script(net) # fails
except:
torch.jit.script(net) # succeeds, while nothing has changed |
I mean - your snippet ran successfully for me in all cases |
Thanks for the reply. Again, I have tested the code snippet and getting the same error consistently. It would be great if this can be tested by another person. |
added one more point to check to my previous comment ^ |
It seems that TorchScript support is made available in this commit which is not included in 0.3.2. Considering this, would it be possible to release a new version and include it ? Thanks again |
Hi Ali, thanks for tracking this down. I've published a new version to pypi, it contains this commit, please try it |
Updated
The original issue was closed, despite the fact that provided snippet still uses a module, as opposed to a function and tested with newer and older PyTorch versions. Opening the issue here in hope of restarting the conversation and finding possible solutions.
Describe the bug
The einops package does not support torch.jit.script. The following snippet tries a simple
Rearrange
operation, using a module to test this. It is observed that the operation is not supported.Reproduction steps
The following snippet should illustrate a concise way of reproducing this issue:
Expected behavior
This is the expected output:
Your platform
einops version: 0.3.2
Python version: 3.8.12
PyTorch version: 1.10.0
CUDA version: 10.2
The text was updated successfully, but these errors were encountered: