Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

[BB3/SeeKeR/BB2] Simplify Retriever Building #4765

Merged
merged 1 commit into from
Aug 23, 2022
Merged

Conversation

klshuster
Copy link
Contributor

@klshuster klshuster commented Aug 22, 2022

Patch description
I've abstracted building the retriever/search engine object such that we no longer require hacky opt-setting to make sure that the correct retriever is built for an agent. Any model that subclasses RagModel (i.e., BB2, BB3, SeeKeR, FiD, etc.) can now specify a build_retriever method.

Testing steps
Relying on existing CI

Copy link
Contributor

@mojtaba-komeili mojtaba-komeili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need custom building for each under retriever factory or as long as they are subclass of the major ones (eg RAG, FiD, etc.) we are OK.

@klshuster
Copy link
Contributor Author

Do we need custom building for each under retriever factory or as long as they are subclass of the major ones (eg RAG, FiD, etc.) we are OK.

As long as we subclass a major one it's all good. Everything stems from RagModel and that defines the standard build_retriever so it's totally fine to not define one

@klshuster klshuster merged commit e8b1c99 into main Aug 23, 2022
@klshuster klshuster deleted the bb3_module_only branch August 23, 2022 13:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants