this PR fixes the following bug. currently, if the unique_id column differs from values in range(n_ts), and more than one model is being evaluated, mqloss produces the following output:
since result is indexed by unique_id and res is a dataframe indexed by range(n_ts), the concatenation generally fails. the test in the base code works because result and res share the same index (the unique_id column has values in range(n_ts)).
dropping while resetting the index of result should fix the error since the unique_id is expected to share the same index across models.
this PR fixes the following bug. currently, if the
unique_id
column differs from values inrange(n_ts)
, and more than one model is being evaluated,mqloss
produces the following output:the bug comes from this line: https://github.com/Nixtla/utilsforecast/blob/2ebf3725cb9627dc35da85c691844ec895151fdb/utilsforecast/losses.py#L477
since
result
is indexed byunique_id
andres
is a dataframe indexed byrange(n_ts)
, the concatenation generally fails. the test in the base code works becauseresult
andres
share the same index (theunique_id
column has values inrange(n_ts)
).dropping while resetting the index of
result
should fix the error since theunique_id
is expected to share the same index across models.