Closed Serginio3 closed 6 years ago
Hi! When i trying to run interactive.py with model single.mdl i take this problem.
python3 scripts/retriever/interactive.py --model /home/serg/Work/DrQA/scripts/pipeline/single.mdl
07/02/2018 06:09:38 PM: [ Initializing ranker... ] 07/02/2018 06:09:38 PM: [ Loading /home/serg/Work/DrQA/scripts/pipeline/single.mdl ] Traceback (most recent call last): File "scripts/retriever/interactive.py", line 29, in ranker = retriever.get_class('tfidf')(tfidf_path=args.model) File "/home/serg/Work/DrQA/drqa/retriever/tfidf_doc_ranker.py", line 37, in init matrix, metadata = utils.load_sparse_csr(tfidf_path) File "/home/serg/Work/DrQA/drqa/retriever/utils.py", line 34, in load_sparse_csr matrix = sp.csr_matrix((loader['data'], loader['indices'], TypeError: 'int' object is not subscriptable
Are you using the right model? Looks like the model you are trying to load is a DocReader, while you are using the DocRetriever script.
Hi! When i trying to run interactive.py with model single.mdl i take this problem.
python3 scripts/retriever/interactive.py --model /home/serg/Work/DrQA/scripts/pipeline/single.mdl
07/02/2018 06:09:38 PM: [ Initializing ranker... ] 07/02/2018 06:09:38 PM: [ Loading /home/serg/Work/DrQA/scripts/pipeline/single.mdl ] Traceback (most recent call last): File "scripts/retriever/interactive.py", line 29, in
ranker = retriever.get_class('tfidf')(tfidf_path=args.model)
File "/home/serg/Work/DrQA/drqa/retriever/tfidf_doc_ranker.py", line 37, in init
matrix, metadata = utils.load_sparse_csr(tfidf_path)
File "/home/serg/Work/DrQA/drqa/retriever/utils.py", line 34, in load_sparse_csr
matrix = sp.csr_matrix((loader['data'], loader['indices'],
TypeError: 'int' object is not subscriptable