-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Simplify ensemble retriever #14427
Simplify ensemble retriever #14427
Conversation
ahmed-moubtahij
commented
Dec 8, 2023
•
edited
Loading
edited
- Description: code simplification to improve readability and remove unnecessary memory allocations.
- Tag maintainer: @baskaryan, @eyurtsev, @hwchase17.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…em/langchain into simplify-ensemble_retriever
@@ -38,6 +38,14 @@ def wrapper(*args: Any, **kwargs: Any) -> Any: | |||
|
|||
return decorator | |||
|
|||
T = TypeVar('T') | |||
H = TypeVar('H', bound=Hashable) | |||
def unique_by_key(iterable: Iterable[T], key: Callable[[T], H]) -> Iterator[T]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just worth being local to ensemble retriever until we use in multiple places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwchase17 Any more changes you'd like to see?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwchase17 I apparently needed to run make lint
at the langchain_core level as well (root didn't detect the lint fails on CI), it should be ok now.
…em/langchain into simplify-ensemble_retriever
@hwchase17 @baskaryan Looks good to go? |
make format and make lint pass locally but fail on CI (
I don't know how to fix this. |
Deployment failed with the following error:
|
- **Description:** code simplification to improve readability and remove unnecessary memory allocations. - **Tag maintainer**: @baskaryan, @eyurtsev, @hwchase17. --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
- **Description:** code simplification to improve readability and remove unnecessary memory allocations. - **Tag maintainer**: @baskaryan, @eyurtsev, @hwchase17. --------- Co-authored-by: Bagatur <baskaryan@gmail.com>