jhyuklee / paragraphranker Goto Github PK
View Code? Open in Web Editor NEWEMNLP'2018: Ranking Paragraphs for Improving Answer Recall in Open-Domain Question Answering
Home Page: https://arxiv.org/abs/1810.00494
EMNLP'2018: Ranking Paragraphs for Improving Answer Recall in Open-Domain Question Answering
Home Page: https://arxiv.org/abs/1810.00494
Below is the error output, even though I have developed the according to the DrQA. I think the reason is pytorch version? Right now I am using pytorch=0.4.1, while DrQA is not compatible with this version.
Hope someone can help me thanks.
By the way, can i do the interactive retriever with the help of Paragraph Ranker?
12/13/2018 05:26:03 PM: [ COMMAND: entityqa/pipeline/predict.py --query-type SQuAD --ranker-type default --reader-type default ]
12/13/2018 05:26:03 PM: [ ---------------------------------------------------------------------------------------------------- ]
12/13/2018 05:26:03 PM: [ CONFIG:
{
"candidate_file": null,
"cuda": true,
"data_workers": 5,
"db_path": "/home/jiangkunhaha/ParagraphRanker/data/wikipedia/docs.db",
"embed_dir": "/home/jiangkunhaha/datasets",
"embedding_dim": 300,
"embedding_file": "/home/jiangkunhaha/datasets/glove/glove.840B.300d.txt",
"fasttext": false,
"gpu": -1,
"log_file": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results/20181213-d59542b8.txt",
"match": "string",
"model_dir": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results",
"model_name": "20181213-d59542b8",
"module_batch_size": 64,
"module_max_loaders": 5,
"n_docs": 20,
"n_pars": 200,
"no_cuda": false,
"parallel": false,
"pred_file": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results/pred_20181213-d59542b8.json",
"predict_batch_size": 100,
"query_data": "/home/jiangkunhaha/ParagraphRanker/data/datasets/SQuAD-v1.1-dev.txt",
"query_split": "dev",
"query_type": "SQuAD",
"random_seed": 1013,
"ranker_file": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results/20181213-d59542b8.ranker",
"ranker_path": "/home/jiangkunhaha/ParagraphRanker/entityqa/ranker/results/20181212-a0db0070.mdl",
"ranker_type": "default",
"reader_path": "/home/jiangkunhaha/ParagraphRanker/entityqa/reader/results/single.mdl",
"reader_type": "default",
"retriever_path": "/home/jiangkunhaha/ParagraphRanker/data/wikipedia/docs-tfidf-ngram=2-hash=16777216-tokenizer=simple.npz",
"tokenizer": "regexp",
"train": false,
"train_epoch": 30
} ]
12/13/2018 05:26:03 PM: [ Reading query data /home/jiangkunhaha/ParagraphRanker/data/datasets/SQuAD-v1.1-dev.txt ]
12/13/2018 05:26:03 PM: [ Initializing pipeline... ]
12/13/2018 05:26:03 PM: [ Loading retriever /home/jiangkunhaha/ParagraphRanker/data/wikipedia/docs-tfidf-ngram=2-hash=16777216-tokenizer=simple.npz ]
12/13/2018 05:26:35 PM: [ Loading ranker /home/jiangkunhaha/ParagraphRanker/entityqa/ranker/results/20181212-a0db0070.mdl ]
12/13/2018 05:26:37 PM: [ Loading reader /home/jiangkunhaha/ParagraphRanker/entityqa/reader/results/single.mdl ]
Traceback (most recent call last):
File "entityqa/pipeline/predict.py", line 367, in <module>
main(args)
File "entityqa/pipeline/predict.py", line 257, in main
fixed_candidates=candidates)
File "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/root/pipeline/pipeline.py", line 74, in __init__
self.reader = DocReader.load(reader_path, normalize=False)
File "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/root/reader/model.py", line 438, in load
filename, map_location=lambda storage, loc: storage
File "/home/jiangkunhaha/anaconda3/envs/ranker/lib/python3.6/site-packages/torch/serialization.py", line 358, in load
return _load(f, map_location, pickle_module)
File "/home/jiangkunhaha/anaconda3/envs/ranker/lib/python3.6/site-packages/torch/serialization.py", line 542, in _load
result = unpickler.load()
ModuleNotFoundError: No module named 'drqa'
Need more information on these lines in entityqa/pipeline/predict.py
,
RET_PATH = os.path.join(PATHS['WIKI'],
'docs-tfidf-ngram=2-hash=16777216-tokenizer=simple.npz')
DOC_DB_PATH = os.path.join(PATHS['WIKI'], 'docs.db')
In line 17 in download.sh
,
wget -O "$DOWNLOAD_PATH_TAR" "https://s3.amazonaws.com/fair-data/drqa/data.tar.gz"
has to be replaced with,
wget -O "$DOWNLOAD_PATH_TAR" "https://dl.fbaipublicfiles.com/drqa/data.tar.gz"
Since the file location has been changed. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.