Prophet 1.1.5 saving and loading model leads to incorrect historical data points & possibly prediction
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 4.6k
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 1
Description
I am encountering model corruption on save.
My current approach is to fit model -> model_to_json -> cloud bucket / filesystem-> model_from_json(f.read()). Once I read the model, I tend to encounter corruption issues. I am able to use the loaded model but its representation of historical data is inaccurate (all of the datapoints are clumped up very tightly in 1970s, predictions tend to be in 1970, 1 second apart, instead of data interval). Before I save the model, the plot function shows the results I expect to see (repeating pattern over span of training data in 2023/2024). Once saved its no longer the case.
Also once model is loaded make_future_dataframe does not produce expected timestamps (instead of being 1hour or 15 mins apart and in 2024, predicted points are in 1970s and 1 second apart). The data is sub-daily (1 hour/15 minutes).
None of the above issues are present if I skip the saving and loading and do prediction after fitting. Then Prophet behaves as expected.
Is this a bug or I should change my approach?
Contributor guide
Assessment
This issue has not been assessed yet.