Closed dmitra79 closed 2 years ago
Without having looked at this too closely, this seems to be the culprit:
This forces the float64
dtype on all columns. We should ensure that item_id
is not part of it.
However, the Evaluator
is something I want to see generally reworked in the future. I don't think we should return a DataFrame
at all. I've done some work on this in #1778.
Related to #2100
Fixed in #2183
Description
When
item_id
for data instances are integers or strings representing integers,backtest.backtest-metrics()
produces an item_metrics data frame whereitem_id
is a float (see code below). This causes a problem when trying to join the metrics with other data frames representing the instances, since ids no longer match, ie. '1' != 1.0.While this is easy to fix after the call, ex:
this is un-intuitive and requires time and effort to catch.
At the same time, if
item_id
are non-numeric strings, there is no issue.To Reproduce
Error message or code output
The type of the
item_id
column is float, even thoughitem_id
were stringsEnvironment
(Add as much information about your environment as possible, e.g. dependencies versions.)