AutoViML / Auto_TS

Automatically build ARIMA, SARIMAX, VAR, FB Prophet and XGBoost Models on Time Series data sets with a Single Line of Code. Created by Ram Seshadri. Collaborators welcome.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnboundLocalError: local variable 'forecast_df_folds' referenced before assignment

antlig opened this issue · comments

error

Hello,
I am using the auto_time series version: 0.0.64 and when I run the following code:

- model = auto_timeseries (score_type = 'rmse', time_interval = 'M', non_seasonal_pdq = None, seasonality = False,
         seasonal_period = 12, model_type = ['best'], verbose = 2, dask_xgboost_flag = 0)

- model.fit (traindata, ts_column, target)

I get the following error:
UnboundLocalError: local variable 'forecast_df_folds' referenced before assignment (see iimagine).

Doing a quick analysis, it would appear that the variable 'forecast_df_folds' is either not initialized on line 539 (auto_ts / __ init __. Py) or it needs to be renamed to 'forecasts'.

I use Google Colab notebook.

Thanks
AL



Hello @antlig 👍
it appears that Facebook prophet is not installed on your colab machine. So please do this first and then re-run it.

conda install -c conda-forge prophet

Then re-run it.

If you cannot run conda, then use the link below to install fbprophet:

https://facebook.github.io/prophet/docs/installation.html

Please note that when the model has not run, then there are no forecasts and hence forecast_df_folds gives an error.
Thanks
Auto_TS

prophet2
prophet

Hello,
I have replicated the steps you indicated, but it still doesn't work. I ran a 'pip list' to see if Facebook prophet was present and as you can see from the image it is there.

Hi @antlig 👍
In that case, let's look at the data. Can you please post a Colab link to your notebook or a GitHub link to your notebook so we can trouble shoot the data and the calling statement?
It's possible you are making some small mistake - I can see that "y" is not in the index error below that auto-ts is not finding your target variable. Can you please post your calling statement (how you call auto-timseries) and what the first few rows of data look like?
https://user-images.githubusercontent.com/23186883/153875186-7bbd6616-45f0-4c4f-9a2c-c5946d67078c.png
Thanks