Issue with Hybrid search
See original GitHub issueHello, I got this error when running hybrid retrieval.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/site-packages/pyserini/hsearch/__main__.py", line 159, in <module>
results = hsearcher.batch_search(
File "/usr/local/lib/python3.8/site-packages/pyserini/hsearch/_hybrid.py", line 46, in batch_search
hybrid_result = {
File "/usr/local/lib/python3.8/site-packages/pyserini/hsearch/_hybrid.py", line 47, in <dictcomp>
key: self._hybrid_results(dense_result[key], sparse_result[key], alpha, k)
File "/usr/local/lib/python3.8/site-packages/pyserini/hsearch/_hybrid.py", line 58, in _hybrid_results
min_sparse_score = min(sparse_hits.values())
ValueError: min() arg is an empty sequence
The problem occurs when sparse retrieval does not generate any hit for some queries. The same can happen for dense retrieval. https://github.com/castorini/pyserini/blob/c7b37d6073cda62685f64d6d0b99dc46f0718346/pyserini/hsearch/_hybrid.py#L60
For the moment, I’m trying to find a way to get around it. Is there any way to force sparse retrieval to generate hits for all queries? Thanks in advance!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Hybrid search fails to crawl or return results - SharePoint
You experience one or more of the following issues when you use hybrid search in SharePoint in Microsoft 365: Crawling fails.
Read more >Hybrid Search: Effectively Combining Keywords and Semantic ...
This paper describes hybrid search, a search method supporting both document and knowledge retrieval via the flexible combination of ontology-based search ...
Read more >Troubleshooting Cloud Hybrid Search - Packt Subscription
There are times when configuring or managing cloud hybrid search doesn't go as expected. Most issues can be easily fixed.
Read more >Modernizing Enterprise Search with a Hybrid Federated ...
As an example, performance of query results is often raised as an issue of ... By using a hybrid federated search approach, the...
Read more >Efficient hybrid search for visual reconstruction problems
In this paper, we propose a novel hybrid search algorithm as a solution for the general coupled nonconvex minimization problem with an MRF...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lintool sure. I’ll try to submit one. Thanks for the great library!
@jayparks A PR to note successful reproduction would be appreciated: https://github.com/castorini/pyserini/blob/master/docs/experiments-dpr.md#reproduction-log