Skip to content

Pytorch Implementation of EACL paper(findings) Bridging the Gap between Pre-Training and Fine-Tuning for Commonsense Generation

Notifications You must be signed in to change notification settings

LHRYANG/CommonGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommenGen

Pytorch Implementation of EACL paper(findings) Bridging the Gap between Pre-Training and Fine-Tuning for Commonsense Generation

How to train

./train.sh

We also provide our trained model here

How to test

python test.py --output_dir models/

models/ is the directory that contains the trained model model.bin.

How to evaluate

We provide our predicted test file test_pred.txt under data/

Download and unzip the evaluation files here

1. obtain coverage score

cd evaluation/PivotScore

python evaluate.py --pred your_pred_file --ref ../../data/test_trg.txt --cs ../../data/test_src.txt

2. obtain other score

python convert_to_json.py --src data/test_src.txt --trg data/test_trg.txt --pred your_pred_file

cd evaluation/CaptionMetrics/

python main.py --trg ../../temp_trg.json --pred ../../temp_pred.json

About

Pytorch Implementation of EACL paper(findings) Bridging the Gap between Pre-Training and Fine-Tuning for Commonsense Generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published