Prophet 1.1.5 model is corrupted after being saved and loaded via model_to_json and model_from_json

20 Views Asked by At

When the model is fit and then saved and loaded via model_to_json and model_from_json, it does not provide accurate predictions. Issue is not present if save and load process is skipped and model used for prediction right after fitting.

After loading Prophet model shows all the data in 1970 being 1 second apart instead of being in 2023/24 15mins/1hour apart.The predicted data also ends up in 1970s 1 second apart (make_future_dataframe). Further, predicted data tends to be less accurate.

When fitting and prediction is combined together, bypassing saving and loading stage, Prophet behaves as expected. The issue is only present when I save the model to cloud bucket or in the filesystem.

I compared outputs of plot command. Before being saved and loaded, it's output is accurate and as it is expected.

How can I save & load the model without having it corrupted? What would be recommended troubleshooting steps?

0

There are 0 best solutions below