pygaggle icon indicating copy to clipboard operation
pygaggle copied to clipboard

ImportError: cannot import name 'JLuceneSearcherResult' from 'pyserini.search' (/usr/local/lib/python3.10/dist-packages/pyserini/search/__init__.py)

Open SamiKhan-cse19 opened this issue 1 year ago • 0 comments

Error upon installation from git repo.

Installation:

git clone --recursive https://github.com/castorini/pygaggle.git
cd pygaggle/
pip install -r requirements.txt
pip install -e /content/pygaggle

Code:

from pygaggle.rerank.base import Query, Text
from pygaggle.rerank.transformer import MonoT5

reranker =  MonoT5()

Output: image

I managed to run by install pyserini==0.23.0. It seems the requirements.txt does not list an upper bound for pyserini and the latest version 0.24.0 causes this problem. Please provide an upper bound or change the imports in the source code.

SamiKhan-cse19 avatar Feb 08 '24 15:02 SamiKhan-cse19