This is how my dataframe looks like:
Then when I try to fit a prophet model, I get this error:
>>> from prophet import Prophet
>>> m = Prophet()
>>> m.fit(df)
16:35:16 - cmdstanpy - INFO - Chain [1] start processing
16:35:16 - cmdstanpy - INFO - Chain [1] done processing
16:35:16 - cmdstanpy - ERROR - Chain [1] error: terminated by signal 6 Unknown error: -6
Optimization terminated abnormally. Falling back to Newton.
16:36:22 - cmdstanpy - INFO - Chain [1] start processing
16:36:22 - cmdstanpy - INFO - Chain [1] done processing
16:36:22 - cmdstanpy - ERROR - Chain [1] error: terminated by signal 6 Unknown error: -6
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~/miniforge3/lib/python3.10/site-packages/prophet/models.py:96, in CmdStanPyBackend.fit(self, stan_init, stan_data, **kwargs)
95 try:
---> 96 self.stan_fit = self.model.optimize(**args)
97 except RuntimeError as e:
98 # Fall back on Newton
File ~/miniforge3/lib/python3.10/site-packages/cmdstanpy/model.py:738, in CmdStanModel.optimize(self, data, seed, inits, output_dir, sig_figs, save_profile, algorithm, init_alpha, tol_obj, tol_rel_obj, tol_grad, tol_rel_grad, tol_param, history_size, iter, save_iterations, require_converged, show_console, refresh, time_fmt, timeout)
737 else:
--> 738 raise RuntimeError(msg)
739 mle = CmdStanMLE(runset)
RuntimeError: Error during optimization! Command '/Users/Admin/miniforge3/lib/python3.10/site-packages/prophet/stan_model/prophet_model.bin random seed=56334 data file=/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/tmpcyyh7d7t/2qlqak12.json init=/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/tmpcyyh7d7t/z3_79y1x.json output file=/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/tmpcyyh7d7t/prophet_modelufn_f82n/prophet_model-20230208163516.csv method=optimize algorithm=lbfgs iter=10000' failed: console log output:
dyld[37030]: Library not loaded: @rpath/libtbb.dylib
Referenced from: <AC271190-0BD7-38FF-AFC9-F18DFE088087> /Users/Admin/miniforge3/lib/python3.10/site-packages/prophet/stan_model/prophet_model.bin
Reason: tried: '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libtbb.dylib' (no such file), '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file, not in dyld cache)
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
Input In [7], in <cell line: 3>()
1 m = Prophet()
----> 2 m.fit(df)
File ~/miniforge3/lib/python3.10/site-packages/prophet/forecaster.py:1181, in Prophet.fit(self, df, **kwargs)
1179 self.params = self.stan_backend.sampling(stan_init, dat, self.mcmc_samples, **kwargs)
1180 else:
-> 1181 self.params = self.stan_backend.fit(stan_init, dat, **kwargs)
1183 self.stan_fit = self.stan_backend.stan_fit
1184 # If no changepoints were requested, replace delta with 0s
File ~/miniforge3/lib/python3.10/site-packages/prophet/models.py:103, in CmdStanPyBackend.fit(self, stan_init, stan_data, **kwargs)
101 logger.warning('Optimization terminated abnormally. Falling back to Newton.')
102 args['algorithm'] = 'Newton'
--> 103 self.stan_fit = self.model.optimize(**args)
104 params = self.stan_to_dict_numpy(
105 self.stan_fit.column_names, self.stan_fit.optimized_params_np)
106 for par in params:
File ~/miniforge3/lib/python3.10/site-packages/cmdstanpy/model.py:738, in CmdStanModel.optimize(self, data, seed, inits, output_dir, sig_figs, save_profile, algorithm, init_alpha, tol_obj, tol_rel_obj, tol_grad, tol_rel_grad, tol_param, history_size, iter, save_iterations, require_converged, show_console, refresh, time_fmt, timeout)
736 get_logger().warning(msg)
737 else:
--> 738 raise RuntimeError(msg)
739 mle = CmdStanMLE(runset)
740 return mle
RuntimeError: Error during optimization! Command '/Users/Admin/miniforge3/lib/python3.10/site-packages/prophet/stan_model/prophet_model.bin random seed=73289 data file=/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/tmpcyyh7d7t/6qjofygo.json init=/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/tmpcyyh7d7t/3wkgsh__.json output file=/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/tmpcyyh7d7t/prophet_modelpxzqvzzp/prophet_model-20230208163622.csv method=optimize algorithm=newton iter=10000' failed: console log output:
dyld[37096]: Library not loaded: @rpath/libtbb.dylib
Referenced from: <AC271190-0BD7-38FF-AFC9-F18DFE088087> /Users/Admin/miniforge3/lib/python3.10/site-packages/prophet/stan_model/prophet_model.bin
Reason: tried: '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libtbb.dylib' (no such file), '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/8f/qf0d4l3j2mn5_vw839wgcj1w0000gn/T/pip-install-woutubot/prophet_98a976c6cbfd4e95b7cb41d7d690c7eb/build/lib.macosx-11.0-arm64-cpython-310/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file, not in dyld cache)
Any idea what the problem is? I am on an M1 Mac, if that matters.