Open jelc53 opened 2 years ago
Solved (I think). Needed to pass inits
rather than init
to match cmdstanpy
kwargs interface. Suggest the documentation needs updating https://facebook.github.io/prophet/docs/additional_topics.html#updating-fitted-models
Your solution works thank you sir! Documentation indeed needs updating
Bug description
When trying to update my model fit with new data using
updated fitted model
section here (https://facebook.github.io/prophet/docs/additional_topics.html), I get the following errorTraceback (most recent call last): File "<string>", line 1, in <module> File "/virtualenvs/smartshift-load-forecasting-9TtSrW0h-py3.9/lib/python3.9/site-packages/prophet/forecaster.py", line 1171, in fit self.params = self.stan_backend.fit(stan_init, dat, **kwargs) File "/virtualenvs/smartshift-load-forecasting-9TtSrW0h-py3.9/lib/python3.9/site-packages/prophet/models.py", line 90, in fit kwargs['inits'] = self.prepare_data(kwargs['init'], stan_data)[0] File "/virtualenvs/smartshift-load-forecasting-9TtSrW0h-py3.9/lib/python3.9/site-packages/prophet/models.py", line 164, in prepare_data 'y': data['y'].tolist(), AttributeError: 'list' object has no attribute 'tolist'
Note: Potentially a similar issue mentioned here: https://issuemode.com/issues/facebook/prophet/104552814.
Reproducible example
Unable to provide data since sensitive, but here is a santiized excert.
0 2022-03-01 00:00:00 7.677567 1 2022-03-01 00:30:00 7.840946 2 2022-03-01 01:00:00 7.888173 3 2022-03-01 01:30:00 7.870759 4 2022-03-01 02:00:00 7.714092