pygaggle
pygaggle copied to clipboard
ImportError: cannot import name 'JLuceneSearcherResult' from 'pyserini.search' (/usr/local/lib/python3.10/dist-packages/pyserini/search/__init__.py)
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:
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.