Runtime Error for Prophet on Mac M2 Pro
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 4.6k
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 1
Description
For some reason I cant fit the data this error keeps coming up, has anybody found a solution for this ?
This is the error i keep getting every time i run model.fit(df)
I am using Macbook pro M2 pro
Jupyter Notebook
Python version 3.11.4
Prophet 1.1.1
INFO:prophet:Disabling weekly seasonality. Run prophet with weekly_seasonality=True to override this.
INFO:prophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
INFO:prophet:n_changepoints greater than number of observations. Using 24.
INFO:cmdstanpy:start chain 1
INFO:cmdstanpy:finish chain 1
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[29], line 2
1 model = Prophet()
----> 2 model.fit(df)
File ~/anaconda3/lib/python3.11/site-packages/prophet/forecaster.py:1174, in Prophet.fit(self, df, **kwargs)
1172 self.params = self.stan_backend.sampling(stan_init, dat, self.mcmc_samples, **kwargs)
1173 else:
-> 1174 self.params = self.stan_backend.fit(stan_init, dat, **kwargs)
1176 self.stan_fit = self.stan_backend.stan_fit
1177 # If no changepoints were requested, replace delta with 0s
File ~/anaconda3/lib/python3.11/site-packages/prophet/models.py:100, in CmdStanPyBackend.fit(self, stan_init, stan_data, **kwargs)
97 except RuntimeError as e:
98 # Fall back on Newton
99 if not self.newton_fallback or args['algorithm'] == 'Newton':
--> 100 raise e
101 logger.warning('Optimization terminated abnormally. Falling back to Newton.')
102 args['algorithm'] = 'Newton'
File ~/anaconda3/lib/python3.11/site-packages/prophet/models.py:96, in CmdStanPyBackend.fit(self, stan_init, stan_data, **kwargs)
93 args.update(kwargs)
95 try:
---> 96 self.stan_fit = self.model.optimize(**args)
97 except RuntimeError as e:
98 # Fall back on Newton
99 if not self.newton_fallback or args['algorithm'] == 'Newton':
File ~/anaconda3/lib/python3.11/site-packages/cmdstanpy/model.py:396, in CmdStanModel.optimize(self, data, seed, inits, output_dir, save_diagnostics, algorithm, init_alpha, iter)
392 if runset._retcode(dummy_chain_id) != 0:
393 msg = '{}, error code {}'.format(
394 msg, runset._retcode(dummy_chain_id)
395 )
--> 396 raise RuntimeError(msg)
397 mle = CmdStanMLE(runset)
398 mle._set_mle_attrs(runset.csv_files[0])
RuntimeError: Error during optimizing, error code -6
Contributor guide
Assessment
This issue has not been assessed yet.