Skip to content

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

@SamiKhan-cse19

Description

@SamiKhan-cse19

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions