Torch load issue fix with pytorch 2.6#543
Conversation
|
Thanks a lot @ArozHada For the PR. This was blocking other PRs and failing test cases :) |
|
@ArozHada So, apparently, the test cases for older versions of Python and by extension PyTorch is failing cause of the new change. see here Can you raise a new PR and have a try catch block to catch the error and try again without weights only? so that it works for older versions of PyTorch? PR #540 is failing (so will others) cause of this. |
|
Hello, |
|
I guess the second option.. PyTorch and newer versions are typically not available in many cases. For instance you are forced to run an older version of python, or the CUDA runtimes you are working with is not latest, or the OS is not latest(like Ubuntu 20.04). All of this impacts which version of PyTorch one is working with. So, I guess to be working for majority of people, I guess second option would be great.. |
|
Hello, I encountered the same problem while running the code. How can I download the latest update now. |
|
@YoungAgile, if you use a python version > 3.9 and Pytorch 2.6 should work. For older versions, will try to get the fix soon. |
Pytorch 2.6 updated the torch.load function with "weights_only = True" as default.
This caused an issue with the library making any load process crash. This also caused the tests to fail for other PRs #540 and even other bot PRs, #536, #537.
I set for all torch.load functions to be "weight_only = False" instead of the default True to fix this issue.
📚 Documentation preview 📚: https://pytorch-tabular--543.org.readthedocs.build/en/543/