whylabs/whylogs

log_batch_ranking_metrics error

Closed this issue · 1 comments

Description

You can repro using this notebook:
https://github.com/whylabs/whylogs/blob/mainline/python/examples/experimental/Writing_Ranking_Performance_Metrics_to_WhyLabs.ipynb

Hits an error in versions of whylogs after 1.3.21:

target_order = np.array(row_dict[target_column]).argsort()[::-1]
     99         dcg_vals = [
--> 100             (rel / math.log(i + 2, 2)) for i, rel in enumerate(np.array(row_dict[target_column])[predicted_order][:k])
    101         ]
    102         idcg_vals = [

IndexError: index 1 is out of bounds for axis 0 with size 1

whylogs 1.3.21 does not hit this.

This was fixed since whylogs 1.3.26