Some ERROR in the period of running the code
Hello, I just reproduced your code from the author. During the reproduction process, many problems occurred and the program could not run. The problems that occur during operation are shown in the following content:
(myconda) root@844b4bd8212f:/mnt/GraphWriter/GraphWriter-master# python generator.py -save SAVED_MODEL
Loading Data from data/preprocessed.train.tsv
building vocab
done
Vocab sizes:
src 6343
ent 53343
nerd 8
rel 17
out 11738
graph
Traceback (most recent call last):
File "generator.py", line 70, in
If there is a problem with the Linux command, then if the code is run according to the corresponding directory, the following problems will still occur:
(myconda) root@844b4bd8212f:/mnt/GraphWriter/GraphWriter-master# python generator.py -save=DIR/0.vloss-4.166054.lr-0.1
Loading Data from data/preprocessed.train.tsv
building vocab
done
Vocab sizes:
src 6343
ent 53343
nerd 8
rel 17
out 11738
graph
Traceback (most recent call last):
File "generator.py", line 79, in
However, there is no relevant folder in the file you gave. Even after I created the corresponding folder, there will still be related problems, so I would like to ask you and relevant persons how to solve this problem. Thank you very much.
I think if you change line 27 of generator to be a more appropriate filename it will work. I will clean up this part of the code ASAP. Thanks!
@rikdz Thank you very much for your timely help. But there are still problems in the process of running eval.py. I don't know if I need to install other environments or components. The specific issues are as follows:
File "eval.py", line 92, in
meteor need jave environment
@wutaiqiang OK ,Thank you very much. After installing JAVA, do I need to configure other environments?
maybe not,i use other lib to get the score,https://github.com/Maluuba/nlg-eval
@wutaiqiang Thank you very much for your kind help, I will have a try.
@rikdz @wutaiqiang Thank you very much for your previous help. After installing Java, I ran the eval.py file again, but there were still problems:
Traceback (most recent call last):
File "eval.py", line 102, in
@15071347094 i think this is because the encoding way for txt,the txt file is encoding by UTF-8 and you should transfer the encoding way to ANSI【记事本打开,另存为txt,可以选择ansi选项,然后应该就可以了】
@15071347094 I had this error when I tried to run the code with python3. Using python2 worked for me. Maybe this is your problem, too?
python 2 and python 3 is different in handling the utf-8 encode txt
@wutaiqiang @mnschmit Thank you very much for your sincere help, I just saw your reply. In terms of environment, I use python3.7, but if I choose to switch to python2, I may have to configure many environments, so if I change the file format, I am directly modifying the suffix names of the two files to be compared ?
if you have changed the file format,just use the file
@wutaiqiang Thank you very much, I will have a try.
@wutaiqiang Thank you for the method thta you provided, but according to your prompt, after changing the file to a text file, the previous problem will still occur when running the program. The following is the specific error message:
D:\CCNU\Pycharm\import4\GraphWriter-master>python eval.py 0.vloss-4.254202.lr-0.1cmdline.txt data\preprocessed1.test.txt
Traceback (most recent call last):
File "eval.py", line 102, in
hard to believe , i use the repo https://github.com/Maluuba/nlg-eval and save the grouth as txt , finally i use the ref.txt and groundtruth.txt to get the score ,both txt need to be tranfered
@wutaiqiang Thank you very much for your kind help. I want to ask if the repo you provided is the same as the author's data environment. In addition, I used python2 to run the program before and found it impossible. It was later discovered that python2 officially ceased operations on January 1 this year. So now I can only use python3 to run the program. Finally, I really appreciate your patience and guidance.
maybe the repo and code from author, i have not compare them, happy to hear that it works
OK,I will have a try------------------ 原始邮件 ------------------ 发件人: "wutaiqiang"[email protected] 发送时间: 2020年4月20日(星期一) 晚上9:56 收件人: "rikdz/GraphWriter"[email protected]; 抄送: "Anderson"[email protected];"Mention"[email protected]; 主题: Re: [rikdz/GraphWriter] Some ERROR in the period of running the code(#18)
maybe the repo and code from author, i have not compare them, happy to hear that it works
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@rikdz @wutaiqiang @mnschmit Thank you very much for your previous help. By running related programs, I found that some data results are a bit different from those in the paper. The following is the result of running on my own computer: Bleu_1: 20.947767 Bleu_2: 10.841722 Bleu_3: 6.3299582 Bleu_4: 3.8990213 RPUGE_L: 14.630650
But the result in the paper is: Bleu:14.3 So I want to ask what is the reason to cause this result. Thank you very much!
@wutaiqiang @rikdz I'm sorry to disturb you, but what I want to confirm is that the result of the BLEU value in the paper is the average of the results of BLEU-1, BLEU-2, BLEU-3, and BLEU-4? Or taking the weighted average result, I want to confirm this, thank you very much
@15071347094 i think it is the BLEU-4 score
@wutaiqiang Thank you very much for your kind help. But the following explanation appeared in the original paper: “To verify the performance gap between GraphWriter and GAT, we report the average test metrics for 4 training runs of each model along with their variances” Does this mean that the final selection of the paper is the average of BLEU 1-4. Looking forward to your reply. Thank you!
it means that author did the experiment for 4 times and get the mean of BLEU-4 score
@wutaiqiang OK,Thank you very much for your kind help.