Question about retriever.py , 'DenseRetriever' object has no attribute '_check_pooling_method' · Issue #149 · RUC-NLPIR/FlashRAG · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the function self._check_pooling_method is missing in the retriever.py?
And is there a typo issue on line 373 and 389 regarding retrieval_model_path?
(base) root@autodl-container-0b0b4098ff-c0c2ad5c:~/autodl-tmp/FlashRAG/examples/quick_start# python simple_pipeline.py
Loading test dataset from: dataset/nq/test.jsonl...
Sliding Window Attention is enabled but not implemented for sdpa; unexpected results may be encountered.
Generating train split: 15000 examples [00:00, 600627.79 examples/s]
Traceback (most recent call last):
File "/root/autodl-tmp/FlashRAG/flashrag/utils/utils.py", line 94, in get_retriever
return getattr(importlib.import_module("flashrag.retriever"), "DenseRetriever")(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 348, in init
self.load_model()
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 389, in load_model
self._check_pooling_method(self.retrieval_model_path, self.pooling_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DenseRetriever' object has no attribute '_check_pooling_method'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/autodl-tmp/FlashRAG/examples/quick_start/simple_pipeline.py", line 38, in
pipeline = SequentialPipeline(config, prompt_template=prompt_templete)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/pipeline/pipeline.py", line 58, in init
self.retriever = get_retriever(config)
^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/utils/utils.py", line 96, in get_retriever
return getattr(importlib.import_module("flashrag.retriever"), "DenseRetriever")(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 348, in init
self.load_model()
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 389, in load_model
self._check_pooling_method(self.retrieval_model_path, self.pooling_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DenseRetriever' object has no attribute '_check_pooling_method'
The text was updated successfully, but these errors were encountered:
Thank you for pointing it out! We have made two modifications to the typo. There may have been some missing parts, but they have been corrected in the previous version. Now you can try pulling the latest code.
It seems that the function self._check_pooling_method is missing in the retriever.py?
And is there a typo issue on line 373 and 389 regarding retrieval_model_path?
(base) root@autodl-container-0b0b4098ff-c0c2ad5c:~/autodl-tmp/FlashRAG/examples/quick_start# python simple_pipeline.py
Loading test dataset from: dataset/nq/test.jsonl...
Sliding Window Attention is enabled but not implemented for
sdpa
; unexpected results may be encountered.Generating train split: 15000 examples [00:00, 600627.79 examples/s]
Traceback (most recent call last):
File "/root/autodl-tmp/FlashRAG/flashrag/utils/utils.py", line 94, in get_retriever
return getattr(importlib.import_module("flashrag.retriever"), "DenseRetriever")(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 348, in init
self.load_model()
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 389, in load_model
self._check_pooling_method(self.retrieval_model_path, self.pooling_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DenseRetriever' object has no attribute '_check_pooling_method'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/autodl-tmp/FlashRAG/examples/quick_start/simple_pipeline.py", line 38, in
pipeline = SequentialPipeline(config, prompt_template=prompt_templete)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/pipeline/pipeline.py", line 58, in init
self.retriever = get_retriever(config)
^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/utils/utils.py", line 96, in get_retriever
return getattr(importlib.import_module("flashrag.retriever"), "DenseRetriever")(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 348, in init
self.load_model()
File "/root/autodl-tmp/FlashRAG/flashrag/retriever/retriever.py", line 389, in load_model
self._check_pooling_method(self.retrieval_model_path, self.pooling_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DenseRetriever' object has no attribute '_check_pooling_method'
The text was updated successfully, but these errors were encountered: