facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.27k stars 4.51k forks source link

Timeout for cross_validation #2348

Open MPiunti opened 1 year ago

MPiunti commented 1 year ago

Would it be feasible a timeout management inside cross validation?

Running prophet in spark for thousands of parallel group of timeseries, i see that for certain groups cross validation is quite expensive So the idea to set a timeout for each forecast, to be handled by cross validation i.e.

try:
   ....
   df_cv = cross_validation(model, cutoffs=dt_ct,  horizon='14 days' ,   parallel=None,
                                 timeout= '60 sec')
except Exception as e:
  use default params

if cross_validation takes more than '60 sec' the exception is handled is there any trick to mimic this ?

thanks

tcuongd commented 1 year ago

I don't think this time management would live in Prophet, we just provide the functionality rather than handle specific requirements. I'd suggest minimising the number of CV folds by limiting the training period or the window size.