terrierteam / ir_measures

provides a common interface to many IR measure tools
https://ir-measur.es/
Apache License 2.0
75 stars 7 forks source link

as_namedtuple_iter with dataframes uses missing attribute #30

Closed jackweitze closed 2 years ago

jackweitze commented 2 years ago

I might be misunderstanding the context of this:

https://github.com/terrierteam/ir_measures/blob/ddb2983387f0da877d821b3c32895bc0d71c8dc3/ir_measures/util.py#L113-L117

But it looks like qrels.iteration is only indexed when iteration is not in self.qrels.columns, resulting in an attribute error.

seanmacavaney commented 2 years ago

You're right- thanks! I'll fix ASAP, and add more comprehensive tests for the qrels converter.

seanmacavaney commented 2 years ago

The issue is now fixed, tests are in place & passing, and an updated version (0.2.3) is on pypi.