Exception when calling fit() - possibly due to changes in PyTorch 2.6 #1682
Replies: 1 comment
-
No solution yet. I moved on to other libs. Closing this question. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi community,
I am testing / evaluating NeuralProphet and ran into a problem when calling fit(). The cause seems to be obvious as the following - torch generates the checkpoint file and tries to load it. 'weights_only' needs to False or add classes to the safe globals.
I do add things to the safe globals. But the list is getting long and it seems that there is always another type to add. I did try AI sites such as copilot, deepseek, etc. but none has good answers.
Any suggestion?
Thank you,
RS
.lr_find_36dc900c-5530-4de7-9e83-371531980937.ckpt
An error occurred: Weights only load failed. In PyTorch 2.6, we changed the default value of the
weights_only
argument intorch.load
fromFalse
toTrue
. Re-runningtorch.load
withweights_only
set toFalse
will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.Please file an issue with the following so that we can make
weights_only=True
compatible with your use case: WeightsUnpickler error: Can only build Tensor, Parameter, OrderedDict or types allowlisted viaadd_safe_globals
, but got <class 'numpy.dtypes.Float64DType'>Beta Was this translation helpful? Give feedback.
All reactions