question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Hybrid search

See original GitHub issue

Hello, 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:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jayparkscommented, Jun 9, 2021

@lintool sure. I’ll try to submit one. Thanks for the great library!

0reactions
lintoolcommented, Jun 8, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found