Note:
The above instructions are for reference only.
You may need to adjust them depending on your operating system and environment.
🚀 Running Evaluation
The evaluation script will automatically download the required datasets and models from Hugging Face.
Please ensure your environment has internet access.
Got it! I’ll add a FAQ section with the issue and solution clearly explained. Here’s how it fits into your README:
❓ FAQ
1. meteor_score Error
If you encounter an error related to meteor_score, you may need to download NLTK resources.
Solution:
In an environment with internet access, run:
python
1import nltk
2nltk.download('wordnet')
By default, the files are downloaded to /root/nltk_data.
If you are using a conda environment and running on a compute node or container, download them into your conda environment instead:
python
1import nltk
2import os
34conda_path = os.path.join(os.environ["CONDA_PREFIX"],"nltk_data")5nltk.download('wordnet', download_dir=conda_path)
You can check all search paths using:
python
1import nltk
2print(nltk.data.path)
2. Running on compute nodes without internet access
If your compute node cannot access the internet due to security policies, you need to pre-download/cache the datasets and models on a node with internet access first.
Recommended steps:
Set the environment variable HF_HOME to a shared/public directory for Hugging Face cache.
On a node with internet access, run a dummy model once to pre-cache everything:
Now, you can run the actual evaluation code on the compute node without needing internet access.
3. Resuming from checkpoints & step-wise evaluation
Because the datasets are large and evaluation can be time-consuming, OpenCompass supports resuming from checkpoints and running evaluations in separate stages.
To resume from a checkpoint, use the -r flag with the timestamp of the previous run:
If you only want to test a subset of a dataset by modifying the code to trim it, be aware that OpenCompass caches the dataset size.
Before running the evaluation, it is recommended to either:
Delete the entire cache file:
rm .cache/dataset_size.json
Or remove the corresponding line for the modified dataset from the cache file.
This ensures that OpenCompass recalculates the dataset size correctly.
🏗️ Codebase and References
This repository is built on top of OpenCompass v0.4.2 with custom modifications.
We plan to merge the changes back into the main OpenCompass branch in the future.