Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSimpleSearcherResult import problem #284

Open
galuscakova opened this issue Jun 7, 2022 · 5 comments
Open

JSimpleSearcherResult import problem #284

galuscakova opened this issue Jun 7, 2022 · 5 comments

Comments

@galuscakova
Copy link

I am trying to run T5 reranking using Pygaggle and these instructions: https://github.com/castorini/pygaggle and I am getting a following error:

2022-06-07 17:35:05 [INFO] loader: Loading faiss with AVX2 support.
2022-06-07 17:35:05 [INFO] loader: Could not load library with AVX2 support due to:
ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'")
2022-06-07 17:35:05 [INFO] loader: Loading faiss.
2022-06-07 17:35:06 [INFO] loader: Successfully loaded faiss.
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/data1/home/mrim/galuscap/tools/environments/reranking/.reranking/lib/python3.7/site-packages/pygaggle/run/evaluate_document_ranker.py", line 11, in <module>
    from pygaggle.rerank.base import Reranker
  File "/data1/home/mrim/galuscap/tools/environments/reranking/.reranking/lib/python3.7/site-packages/pygaggle/rerank/base.py", line 4, in <module>
    from pyserini.search import JSimpleSearcherResult
ImportError: cannot import name 'JSimpleSearcherResult' from 'pyserini.search' (/data1/home/mrim/galuscap/tools/environments/reranking/.reranking/lib/python3.7/site-packages/pyserini/search/__init__.py)

I guess it is a problem in the mismatch between Pygaggle and Pyserini versions? At least, I was able to get this running by using older Pyserini version. However, that version, didn't seem to support the latest models such as MSMARCO v2 trained models.
Is there please any other way how to fix this?

@manveertamber
Copy link
Member

Could you confirm the pyserini version you have installed with which you got it running? You can check using pip list.

@galuscakova
Copy link
Author

Sure, I am running the pyserini version 0.17.0 and pygaggle version 0.0.3.1.

@manveertamber
Copy link
Member

So you were able to get it running with Pyserini version 0.17.0? That is the latest version. I was just able to run T5 reranking from the README with Pyserini 0.17.0 myself.

@manveertamber
Copy link
Member

@galuscakova I think I see your problem. Make sure to install pygaggle using https://github.com/castorini/pygaggle#additional-instructions instead of pip install. Does that help?

@galuscakova
Copy link
Author

Yes, this helped. Thank you for such a fast help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants