-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix error in log message #2719
fix error in log message #2719
Conversation
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.
Looks good! 😊
One last thing missing is to actually pass the index
parameter to _drop_duplicate_documents
here:
haystack/haystack/document_stores/base.py
Line 356 in 0021668
documents = self._drop_duplicate_documents(documents) |
Once done I will merge it 👍
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.
Please add tests before merging
@ZanSara sorry for forgetting 😅 @masci there are already these two tests:
Should we think of other tests? |
@masci I agree with @anakin87 here, this change affects only a log line, and has no functional impact on neither We might use |
This adds logic and I believe it's not directly covered https://github.com/deepset-ai/haystack/pull/2719/files#diff-f69bf03b2cc38f923c98a0d1a1375adac40255f48a5ee8754181c92af3197408R618 Edit: outside the context of this PR, but changing a signature of a function without the need of changing tests is a yellow flag to me. |
I try to recap. Current situation Fixed situation In practice, the @masci however, if we identify significant test cases, we can include them. I can't think of anything particularly relevant, but as @ZanSara suggested, we could verify the log using |
I stand by my opinion here that that line you link does not affect the functionality of
Agreed, but in this specific case this is a private function with a very limited use, and it's covered by two tests that check the important parameters. A reasonable solution here, to avoid the signature change, would be to merge |
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.
No need to test logging output. I stand by my point that index or self.index
translates to a conditional branch and this would probably lower a diff coverage report (if we had one :)) but there's no need to block this PR.
* fix error in log message * Update Documentation & Code Style * pass index to _drop_duplicate_documents * make the use of index in logging more explicit * Update Documentation & Code Style Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Related Issue(s): #1749
Proposed changes:
_handle_duplicate_documents
further on to_drop_duplicate_documents
and change the logging there.@ZanSara please give it a look.
Pre-flight checklist