AmenRa / ranx

⚡️A Blazing-Fast Python Library for Ranking Evaluation, Comparison, and Fusion 🐍
https://amenra.github.io/ranx
MIT License
427 stars 23 forks source link

[BUG] win_tie_loss in Report.to_dict #17

Closed PaulLerner closed 2 years ago

PaulLerner commented 2 years ago

Describe the bug

When converting a Report to dict, you only keep one metric while iterating over metrics (overwriting the previous metric in each loop) https://github.com/AmenRa/ranx/blob/master/ranx/report.py#L315

How to fix replace the line above with: d[m1]["win_tie_loss"][m2][metric] = self.win_tie_loss[(m1, m2)][metric] and init d[m1]["win_tie_loss"][m2] = {} at the same place as https://github.com/AmenRa/ranx/blob/master/ranx/report.py#L309 (just above)

AmenRa commented 2 years ago

Well spotted, thanks!

Fixed in v0.1.14.