You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are the workarounds I found to make things work.
Solution 1: patch torchvision 0.2.2 (dirty and painful)
Pyinstaller works well with torchvision 0.2.2, thus if you do not use too many functionnalities of more recent version of torchvision, you can "patch" old torchvision 0.2.2 by adding the needed new tools. Note that this may need you first use compiled file of torchvision >= 3.0 (_C.so).
Solution 2: Keep recent torchvision & patch torch.jit in your entry point
I found some monkey patch on stackoverflow and dev blogs that simply overwrite 2 methods of torch.jit.
Simply add this path at the beginning of your entry point:
The text was updated successfully, but these errors were encountered:
Mindtrip-Inno
changed the title
How can i patch the torch.jit in the solution? Could not figure out entrypoint ?
How can i patch the torch.jit in the second solution? Could not figure out entrypoint ?
Nov 20, 2022
Solution 1: patch torchvision 0.2.2 (dirty and painful)
Pyinstaller works well with torchvision 0.2.2, thus if you do not use too many functionnalities of more recent version of torchvision, you can "patch" old torchvision 0.2.2 by adding the needed new tools. Note that this may need you first use compiled file of torchvision >= 3.0 (_C.so).
Solution 2: Keep recent torchvision & patch torch.jit in your entry point
I found some monkey patch on stackoverflow and dev blogs that simply overwrite 2 methods of torch.jit.
Simply add this path at the beginning of your entry point:
I still think there should be a more direct way to do that with pyinstaller, but this works for me.
I hope it will help others too.
Originally posted by @Sstrap in pytorch/vision#1899 (comment)
cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
The text was updated successfully, but these errors were encountered: