We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
aggregate_labels
Describe the bug aggregate_labels cannot handle non-sequence typed filter values:
labels = [ Label( id="standard", query="question", answer=Answer(answer="answer1", offsets_in_document=[Span(start=12, end=18)]), document=Document(content="some", id="123"), is_correct_answer=True, is_correct_document=True, origin="gold-label", filters={"name": 123}, )] aggregate_labels(labels)
results in:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/tstad/git/haystack/haystack/utils/labels.py", line 78, in aggregate_labels label_filter_keys = [f"{k}={''.join(v)}" for k, v in l.filters.items()] if l.filters else [] File "/home/tstad/git/haystack/haystack/utils/labels.py", line 78, in <listcomp> label_filter_keys = [f"{k}={''.join(v)}" for k, v in l.filters.items()] if l.filters else [] TypeError: can only join an iterable
Expected behavior Labels with non-sequence typed filter values can be aggregated.
FAQ Check
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
aggregate_labels
cannot handle non-sequence typed filter values:results in:
Expected behavior
Labels with non-sequence typed filter values can be aggregated.
FAQ Check
The text was updated successfully, but these errors were encountered: