facebook/prophet

prophet model and holiday issue in snowflake python sheet

dkryadav opened this issue · 1 comments

I am getting below error :

Traceback (most recent call last): Worksheet, line 7, in File "prophet/init.py", line 8, in from prophet.forecaster import Prophet File "prophet/forecaster.py", line 17, in from prophet.make_holidays import get_holiday_names, make_holidays_df File "prophet/make_holidays.py", line 14, in import prophet.hdays as hdays_part2 File "prophet/hdays.py", line 925, in class TU(Turkey): File "holidays/registry.py", line 172, in init raise TypeError( TypeError: This is a python-holidays entity loader class. For entity inheritance purposes please import a class you want to derive from directly: e.g., from holidays.countries import Entity or from holidays.financial import Entity.

Note: I have installed prophet 1.01 version and holidays 0.29 packages in snowflake snow park python sheet

Below is the code I am trying to use after importing prophet

`final_model = Prophet(holidays= kholiday,

                  changepoint_prior_scale= 0.3,

                  growth = 'linear',

                  holidays_prior_scale = 0.01,

                  n_changepoints = 10,

                  seasonality_mode = 'multiplicative',

                  seasonality_prior_scale= 90,

                  weekly_seasonality=True,

                  daily_seasonality = True,

                  yearly_seasonality = True,

                  interval_width=0.80

                 )

# final_model.add_country_holidays(country_name='US')

final_model.fit(rmr_df_test.reset_index().rename(columns={'MONTH_ID':'ds',

                           'REV_AMT_USDMTHLY':'y'}))`

I have my own kholiday dataframe , It is working in jupyter notebook at local system

If you try holidays==0.18 that should at least get it working in Snowflake. I'm not sure if there are any breaking changes.