JinHuang0101 / StockPrediction

stock prediction of top 5 most actives with Streamlit and Prophet
0 stars 0 forks source link

Runtime error using Prophet #1

Open JinHuang0101 opened 9 months ago

JinHuang0101 commented 9 months ago

RuntimeError: Error during optimization! Command '/opt/homebrew/lib/python3.11/site-packages/prophet/stan_model/prophet_model.bin random seed=3637 data file=/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/tmpuiiljduw/hvxpxvp0.json init=/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/tmpuiiljduw/box50v3b.json output file=/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/tmpuiiljduw/prophet_model2g6t55nm/prophet_model-20230926120514.csv method=optimize algorithm=newton iter=10000' failed: console log output: dyld[79447]: Library not loaded: @rpath/libtbb.dylib Referenced from: /opt/homebrew/lib/python3.11/site-packages/prophet/stan_model/prophet_model.bin Reason: tried: '/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/wc/z084d3qj1wd6cjym3n9gh5d80000gn/T/pip-install-eivqzq1u/prophet_1740db9386d141818dd278228de2c420/build/lib.macosx-13-arm64-cpython-311/prophet/stan_model/cmdstan-2.31.0/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) Traceback: File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in _run_script exec(code, module.dict) File "/Users/jinhuang/Documents/github/Data Engineering/StockPredictionStreamlit/main.py", line 72, in model.fit(df_train) File "/opt/homebrew/lib/python3.11/site-packages/prophet/forecaster.py", line 1181, in fit self.params = self.stan_backend.fit(stan_init, dat, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/prophet/models.py", line 97, in fit self.stan_fit = self.model.optimize(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/cmdstanpy/model.py", line 738, in optimize raise RuntimeError(msg)

JinHuang0101 commented 9 months ago

Might be a compatibility issue with Prophet 1.1.4.

Tried downgrade, didn't work