OpenPI Dataset
收藏OpenPI: Open-Domain Procedural Inference
数据集
OpenPI数据集文件以JSON格式提供,位于openpi-dataset/data/gold/目录下。包含以下四个文件:
id_question.jsonl: 每行是一个包含id、输入句子和其过去句子的JSON对象,即"x"。id_question_metadata.jsonl: 与问题对应的元数据,如主题。每行是一个包含id和元数据的JSON对象。id_answers_metadata.jsonl: 每行是一个包含id和答案列表的JSON对象,即"y"。id_answers.jsonl: 与答案对应的元数据,如实体、属性、之前值、之后值。每行是一个包含id和元数据的JSON对象。
训练
可以通过修改脚本中的超参数来训练模型: sh sh scripts/training_bash.sh
运行预测
对单个文件进行预测: sh python src/model/generation.py --model_path /path/to/trained_model --test_input_file /path/to/input_file --unformatted_outpath /path/to/store/unformatted_predictions --formatted_outpath /path/to/store/formatted/predictions --max_len max_len_say_200
对多个文件进行预测: sh sh scripts/predictions_bash.sh
运行评估
对单个文件进行评估: sh python eval/simple_eval.py -g data/gold/test/id_answers.jsonl -p /path/to/formatted/predictions --quiet
对多个文件进行评估: sh sh scripts/evaluations_bash.sh
超参数
为了匹配论文中发布的结果,请使用以下超参数: https://github.com/allenai/openpi-dataset/blob/main/hyperparams.md
引用
如果在工作中使用此数据集,请引用:
@inproceedings{tandon-etal-2020-dataset, title = "A Dataset for Tracking Entities in Open Domain Procedural Text", author = "Tandon, Niket and Sakaguchi, Keisuke and Dalvi, Bhavana and Rajagopal, Dheeraj and Clark, Peter and Guerquin, Michal and Richardson, Kyle and Hovy, Eduard", booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.emnlp-main.520", doi = "10.18653/v1/2020.emnlp-main.520", pages = "6408--6417" }




