PreSumm icon indicating copy to clipboard operation
PreSumm copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: ''

Open yashwatwani opened this issue 4 years ago • 1 comments

I have added the trained model "bertext_cnndm_transformer.pt" in models folder and two text files in data - one is source in their is one para and another dest which is empty and then I am running this code. "python ./src/train.py -task abs -mode test_text -model_path ./models/bertext_c nndm_transformer.pt -text_src ./data/src -text_tgt ./data/tgt"

I am getting this error

[2020-04-12 09:31:07,554 INFO] Loading checkpoint from Traceback (most recent call last): File "./src/train.py", line 140, in test_text_abs(args) File "/home/yash_watwani/PreSumm-dev/src/train_abstractive.py", line 317, in test_text_abs checkpoint = torch.load(args.test_from, map_location=lambda storage, loc: storage) File "/usr/local/lib/python3.5/dist-packages/torch/serialization.py", line 525, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.5/dist-packages/torch/serialization.py", line 212, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.5/dist-packages/torch/serialization.py", line 193, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: ''

yashwatwani avatar Apr 12 '20 09:04 yashwatwani

"use -test_from $PT_FILE$ to use your model checkpoint file."

Please specify the path to bertext_cnndm_transformer.pt as -test_from.

onrmrt avatar Apr 13 '20 05:04 onrmrt