You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While running some code using haystack I stumbled upon an issue where I always had a list of seemingly empty dicts when getting aggregated labels from a document store. Turns out the issue is just that repr and str are broken on MultiLabel because the data class is missing annotations.
Expected behavior
I'm not sure but I think for asdict() to work we need annotations like in the other data classes. So MultiLabel should probably look like this:
Additionally, I realized there are some inconsistencies between Label and MultiLabel and other data classes such as Document or Answer. While those have some nicely formatted output such as "<Answer ... >", Label and MultiLabel simply have their dict versions as representations. This could be confusing when the underlying data class shows different behaviour from an actual dict.
Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.
Describe the bug
While running some code using haystack I stumbled upon an issue where I always had a list of seemingly empty dicts when getting aggregated labels from a document store. Turns out the issue is just that repr and str are broken on MultiLabel because the data class is missing annotations.
Expected behavior
I'm not sure but I think for
asdict()
to work we need annotations like in the other data classes. So MultiLabel should probably look like this:Additionally, I realized there are some inconsistencies between
Label
andMultiLabel
and other data classes such asDocument
orAnswer
. While those have some nicely formatted output such as"<Answer ... >"
,Label
andMultiLabel
simply have their dict versions as representations. This could be confusing when the underlying data class shows different behaviour from an actual dict.Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.
To Reproduce
Steps to reproduce the behavior
FAQ Check
System:
The text was updated successfully, but these errors were encountered: