When running evaluate.py, I found that bleu, METEOR, and ROUGE_L can all succeed, but the spice evaluation always reports an error. My error report is as follows:
I searched for a long time, and also asked about chatgpt. I tried a lot, and finally found that the java version is too high, and I need the java8 version, while the version under the linux system is 17, so I need to lower the java version, but at the same time I I don’t have root privileges , so I can only go to the java official website to download the compressed package, and then go to my home directory to decompress it.
If you have root permissions, you only need to switch versions or something, it is very simple, so I only talk about the method without permissions.
1. The specific steps are as follows:
This is the download address of the java8 version on the official website:
https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html
Note, first use the following command to see the number of digits in the system:
getconf LONG_BIT
Mine is 64-bit, so choose this one to download:
After downloading, you can create a java directory in your home directory:
mkdir java
After that, the compressed package will be decompressed to the java folder:
tar -zxvf jdk-8u301-linux-x64.tar.gz -C ~/java/
At this point, enter the java folder and use the "ls" command to see the included folders:
Next, edit with the vim editor ~/.bashrc
:
vim ~/.bashrc
Add these two sentences:
export JAVA_HOME=/home/主目录名字/java/jdk1.8.0_351
export PATH=$JAVA_HOME/bin:$PATH
Use this command to make it work:
source ~/.bashrc
Finally, confirm whether the java version is installed successfully:
java -version
Finally, find spice.py
the file, modify it, and change 'java' to the path you just installed . The path you just installed can be which java
obtained by:
Also spice-1.0.jar
change it to an absolute path:
Re-run the code, and the evaluation is successful~