mlforecast
mlforecast copied to clipboard
AssertionError in mlforecast.update
What happened + What you expected to happen
it will not update the values of the model using the update function and yieds:
Exception has occurred: AssertionError
<code object append_several at 0x000001B8AF84E500, file "c:\Users\eshn\Documents\repositories\model\.env\Lib\site-packages\mlforecast\grouped_array.py", line 240> != <code object _append_several at 0x000001B8AD8963F0, file "c:\Users\eshn\Documents\repositories\model\.env\Lib\site-packages\mlforecast\grouped_array.py", line 67>
KeyError: (67, 'c:\\Users\\eshn\\Documents\\repositories\model\.env\\Lib\\site-packages\\mlforecast\\grouped_array.py', <code object _append_several at 0x000001B8AD8963F0, file "c:\Users\eshn\Documents\repositories\model\.env\Lib\site-packages\mlforecast\grouped_array.py", line 67>)
During handling of the above exception, another exception occurred:
File "C:\Users\eshn\Documents\repositories\model\src\strategies\ModelStrategy\XGBoostStrategy.py", line 168, in __updateModelDataAndPrepareForecast__
model.update(updateDf)
File "C:\Users\eshn\Documents\repositories\model\src\strategies\ModelStrategy\XGBoostStrategy.py", line 63, in forecast
explanatory = self.__updateModelDataAndPrepareForecast__(explanatory, model)
File "C:\Users\eshn\Documents\repositories\model\src\balancePriceModule.py", line 96, in forecast
pred = self.modelStrat.forecast(self.df_norm)
File "C:\Users\eshn\Documents\repositories\model\src\forecast.py", line 48, in main
forecast = module.forecast()
File "C:\Users\eshn\Documents\repositories\model\src\forecast.py", line 71, in <module>
main()
AssertionError: <code object append_several at 0x000001B8AF84E500, file "c:\Users\eshn\Documents\repositories\model\.env\Lib\site-packages\mlforecast\grouped_array.py", line 240> != <code object _append_several at 0x000001B8AD8963F0, file "c:\Users\eshn\Documents\repositories\model\.env\Lib\site-packages\mlforecast\grouped_array.py", line 67>
Versions / Dependencies
mlforecast 0.13.4, numba 0.60.0, numpy 2.0.2
Reproduction script
model.update(updateDf)
where updateDf is the dataframe with updated values
Issue Severity
High: It blocks me from completing my task.