-
Notifications
You must be signed in to change notification settings - Fork 90
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
diffuseq-v2: TypeError: load_state_dict() takes 1 positional argument but 3 were given #61
Comments
The error:
|
Workaround for now in case anyone else has this issue: I changed this line back to |
Thank you for pointing out. I mixed them up during the version update. I will update this soon. |
Hi, thanks for your great work. |
Hi, thanks for releasing this code! I'm trying to run decoding code in the diffuseq-v2 branch, but get the above error. The exact command I am running is:
CUDA_VISIBLE_DEVICES=2 python -u run_decode_solver.py --model_dir models/qqp --seed 110 --bsz 100 --step 10 --split test
I noticed that commit cc4e9b4 changes line 65 of
sample_seq2seq.py
fromdist_util.load_state_dict(args.model_path, map_location="cpu")
to
dist_util.load_state_dict(args.model_path, False, "model", map_location="cpu")
(the same change is also present in
sample_seq2seq_dpmSolver.py
)However, the definition in
diffuseq/utils/dist_util.py
, which is not changed, does indeed only take one positional argument:Not sure what's going on here... it seems the branch should have also updated this function? Any help appreciated!
P.S. I was able to run decoding successfully on the main branch, so it's just an issue with
diffuseq-v2
!The text was updated successfully, but these errors were encountered: