Skip to content

Commit bfbe6f9

Browse files
authored
Update README.md
1 parent 8c8d3c2 commit bfbe6f9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,19 @@ CUDA_VISIBLE_DEVICES=0 PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/tag_op python tag_op
3636
We provide a trained checkpoint for the baseline model at [this link](https://drive.google.com/file/d/1VzYy1a_PbOUnqZZLNW58jpWTFL8PRc3B/view?usp=sharing)
3737

3838
## Testing
39-
39+
To evaluate your own splitted validation data, run
4040
```bash
4141
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=$PYTHONPATH:$(pwd) python tag_op/predictor.py --data_dir tag_op/data/roberta --test_data_dir tag_op/data/roberta --save_dir tag_op/model_L2I --eval_batch_size 32 --model_path tag_op/model_L2I --encoder roberta --roberta_model path_to_roberta_model
4242
```
43-
44-
Specify the path to test data via --test_data_dir, e.g. to predict the result for submission, set --test_data_dir tag_op/data/A. The predicted result will be stored in `tag_op/model_L2I/answer_dev.json`.
43+
To generate prediction result for submission, run
44+
```bash
45+
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=$PYTHONPATH:$(pwd) python tag_op/predictor.py --data_dir tag_op/data/roberta --test_data_dir tag_op/data/A --save_dir tag_op/model_L2I --eval_batch_size 32 --model_path tag_op/model_L2I --encoder roberta --roberta_model path_to_roberta_model
46+
```
47+
The predicted result will be stored in `tag_op/model_L2I/answer_dev.json`.
4548

4649
## Result Evaluation
4750

48-
Run `evaluate.py` by specifying the data file with gold answers and the predicted results. This will return the Exact Match and F1 score.
51+
Run `evaluate.py` for your own validation data by specifying the data file with gold answers and the predicted results. This will return the Exact Match and F1 score.
4952

5053
```bash
5154
python evaluate.py dataset_extra_field/tatqa_and_hqa_field_dev.json tag_op/model_L2I/answer_dev.json 0

0 commit comments

Comments
 (0)