Repository navigation
Conversation
torch>=2.6 defaults torch.load to weights_only=True, which rejects the full pickles this library writes (state dicts wrapped with metadata). Pass weights_only=False explicitly, with a TypeError fallback keeping torch<1.13 working (no weights_only flag there; setup.py allows torch>=1.10.0). Fixes RUCAIBox#2212. Signed-off-by: fei <204683769+feiiiiii5@users.noreply.github.com>
|
Checking in on this one, since it has been quiet for a couple of weeks. The fix is one line in the NeuMF loader: One question I could not answer from the issue tracker: whether you would rather Also glad to add a test that loads a released checkpoint if you want the coverage |
|
Checking in on this before it goes stale. The change: The fix: What I would like to know: whether you would rather see the alternative — declaring I am not asking you to re-read the diff to answer; it is a one-line policy question about where the compatibility floor should live. Happy either way, and no rush if this is simply sitting lower in the queue — I will not ping again. |
Fixes #2212.
Root cause
NeuMF.load_pretraincallstorch.load(path, map_location="cpu")withoutweights_only. Since torch 2.6 the default flipped toweights_only=True, which rejects the full pickles this library writes for GMF/MLP pretraining (state dicts wrapped with metadata) — stage 3 fails with_pickle.UnpicklingError: Weights only load failwhile stages 1–2 work.Fix
Pass
weights_only=Falseexplicitly on both loads, with aTypeErrorfallback to the plain call:setup.pyallowstorch>=1.10.0, and torch before 1.13 has noweights_onlyflag (where the old default already loads fully). Diff: 1 file, +9/-2.Test
load_pretrain(searched). The failure mode is the documented torch-2.6 default flip plus the reporter's stage-3 traceback; a full 3-stage NeuMF run is heavy for a unit test — full verification left to CI.