-
Notifications
You must be signed in to change notification settings - Fork 21
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
Cannot load pre-trained model #4
Comments
the --load_path should only point to the ckpt.pt file, not the whole directory. The vocab files should be placed to the directory specified by Lines 101 to 109 in b9c0043
I am sorry for this inconvenience. |
Thanks, Deng, it works now! |
It seems to me that the result is good, except for that you did not do the post-processing step so the result is incomplete. please let me know your point so I can help --). @fliegenpilz357 |
Oh, stupid me! This is completely right, I did not run the post processing. Thank you for your patience and the quick answers! |
Hi Deng,
thanks for the awesome work. I am interested in parsing arbitrary sentence. I took your advice with appending the sentences with dummy-AMRs to the test. The preprocessing worked fine so far, however, when I want to apply the pre-trained model to predict using work.sh (with adapted file path for pre-trained model), I get the following error:
File "/xxxxx/AMR-gs/parser/work.py", line 94, in
model_args = torch.load(fname)['args']
....
File "/zzzzzr/lib/python3.6/site-packages/torch/serialization.py", line 563, in _load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\x00'
The path in work.sh looks as follows:
--load_path amr2.0.bert.gr \
Previously I had downloaded your pre-trained model in the main directory and used tar -xvzf to extract. Did I make any error in the extraction process? My amr2.0.bert.gr contains a file "ckpt.pt" and a directory "vocabs".
The text was updated successfully, but these errors were encountered: