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

[Refactor] Move fix_id_list to Retriever #442

Merged
merged 4 commits into from
Oct 7, 2023

Conversation

gaotongxiao
Copy link
Collaborator

Motivation

The prior design that decoupled fix_id_list from FixKRetriever was terrible and resulted in code redundancy in Inferencers. It also hampered the development of some incoming features.

BC-breaking

This PR breaks some custom config where FixKRetriever is used, but the effect may not be significant, and the migration cost is acceptable. Specifically, users would need to change their configs from

xxx_infer_cfg = dict(
    ...
    retriever=dict(type=FixKRetriever),
    inferencer=dict(type=PPLInferencer, fix_id_list=[0, 1, 2, 3, 4]))

to

xxx_infer_cfg = dict(
    ...
    retriever=dict(type=FixKRetriever, fix_id_list=[0, 1, 2, 3, 4])),
    inferencer=dict(type=PPLInferencer)

Which is quite straightforward.

@gaotongxiao gaotongxiao merged commit 119bfd1 into open-compass:main Oct 7, 2023
3 checks passed
@gaotongxiao gaotongxiao deleted the fixk branch October 7, 2023 04:53
liushz pushed a commit to liushz/opencompass that referenced this pull request Nov 27, 2023
* [Refactor] Move fix_id_list to Retriever

* update

* move to base

* fix
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.

None yet

3 participants