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
Hi @wanmok and @ctongfei. In using this package for another project, I noticed that the current implementation of the set matching metrics gives undesired behavior in the case where:
matching is one-to-one
either the predicted or the reference set (but not both) is empty
the inner metric is not discrete (so this line is not triggered)
In such a case, it’s possible to reach this line with a gram “matrix” that is a 1D array rather than a 2D array, yielding an error like the following when the call to spo.linear_sum_assignment is made:
File "/brtx/601-nvme2/wgantt/.conda/envs/ote/lib/python3.10/site-packages/metametric/core/matching.py", line 30, in score
row_idx, col_idx = spo.linear_sum_assignment(
ValueError: expected a matrix (2-D array), got a 1 array
It feels like we should just add logic to return 0 if we reach here and either x or y is empty. What do you think?
The text was updated successfully, but these errors were encountered:
Hi @wanmok and @ctongfei. In using this package for another project, I noticed that the current implementation of the set matching metrics gives undesired behavior in the case where:
In such a case, it’s possible to reach this line with a gram “matrix” that is a 1D array rather than a 2D array, yielding an error like the following when the call to
spo.linear_sum_assignment
is made:It feels like we should just add logic to return 0 if we reach here and either
x
ory
is empty. What do you think?The text was updated successfully, but these errors were encountered: