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

Refactoring to remove duplicates in pyserini.encode and pyserini.search.faiss #2008

Merged
merged 6 commits into from
Oct 12, 2024

Conversation

lintool
Copy link
Member

@lintool lintool commented Oct 8, 2024

Addresses #1728 which will in turn contributes to #2006

@lintool lintool marked this pull request as draft October 8, 2024 03:36
@lintool lintool requested a review from MXueguang October 8, 2024 11:59
@lintool
Copy link
Member Author

lintool commented Oct 9, 2024

  • I've reconciled the two different versions of QueryEncoder and the two versions of AutoQueryEncoder; retaining only the version in pyserini.encode.
  • Also de-dupped the encoder implementations in pyserini.search.faiss, folding into pyserini.encode as appropriate.
  • Only remaining encoders in pyserini.search.faiss._searcher.py are ClipQueryEncoder and OpenAIQueryEncoder, which I'll refactor in a subsequent pass.

This closes #2009

Running tests right now. After confirming they pass, will be ready to merge.

@lintool lintool marked this pull request as ready for review October 12, 2024 12:39
@lintool
Copy link
Member Author

lintool commented Oct 12, 2024

  • Successfully passed all integrations, core and optional.
  • Successfully ran all below:
[+] nohup ./run-tct2-encoded.sh >& logs/log.tct2-encoded &
[+] nohup ./run-tct2-otf.sh >& logs/log.tct2-otf &
[+] nohup ./run-tct-encoded.sh >& logs/log.tct-encoded &
[+] nohup ./run-tct-otf.sh >& logs/log.tct-otf &
[+] nohup ./run-dpr-encoded.sh >& logs/log.dpr-encoded &
[+] nohup ./run-dpr-otf.sh >& logs/log.dpr-otf &
[+] nohup ./run-ance.sh >& logs/log.ance &
[+] nohup ./run-bpr.sh >& logs/log.bpr &
[+] nohup ./run-distillbert-kd.sh >& logs/log.distillbert-kd &
[+] nohup ./run-distillbert-tasb.sh >& logs/log.distillbert-tasb &
[+] nohup ./run-dkrr.sh >& logs/log.dkrr &
[+] nohup ./run-sbert.sh >& logs/log.sbert &
  • Wrapping up all regressions with prebuilt indexes.

@lintool
Copy link
Member Author

lintool commented Oct 12, 2024

All regressions with prebuilt indexes completed successfully as well. Merging.

@lintool lintool merged commit e68d544 into master Oct 12, 2024
@lintool lintool deleted the encoder-refactoring branch October 12, 2024 23:30
lintool pushed a commit that referenced this pull request Oct 27, 2024
Fixes related to #2008 pyserini.encode and pyserini.search.faiss code duplication.
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

Successfully merging this pull request may close these issues.

2 participants