RuntimeError: Error during optimization!
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- data, machine-learning
Research direction
Reproduce the fit using the listed Python, Prophet, holidays, and cmdstanpy versions and the complete DataFrame, then start at prophet/forecaster.py:1181 and prophet/models.py:97. Check whether the Windows CmdStan process termination is caused by the input data or environment; done requires a confirmed cause and a minimal reproducible case or documented fix.
Written by the indexing model from the issue text.
Description
Hi everyone, I'm getting this error trying to fit my Data Frame.
I tried to use different versions of the library prophet, but in all cases getting the same error.
I did a quickly review on the issues that others have found but different users found different solutions, i tried figure out how to solve, but without good results.
Environment:
Python 3.12
prophet==1.1.4
holidays==0.32
cmdstanpy==1.2.4
df structure :
ds y
0 2022-06-02 -188719.00
1 2022-06-03 -77518.00
2 2022-06-04 105109.00
3 2022-06-05 -34873.00
4 2022-06-08 -22407.00
My log at this moment is:
INFO:prophet:Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this.
INFO:prophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
DEBUG:cmdstanpy:input tempfile: C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\xkyce9lj.json1\AppData\Local\Temp\tmp5eionmg2\q2yyhsm8.json
DEBUG:cmdstanpy:input tempfile: C:\Users\MURILO
DEBUG:cmdstanpy:idx 0
DEBUG:cmdstanpy:running CmdStan, num_threads: None
DEBUG:cmdstanpy:CmdStan args: ['C:\Users\MuriloXavierDeSousa\PycharmProjects\learn\.venv\Lib\site-packages\prophet\stan_model\prophet_model.bin', 'random', 'seed=14426', 'data', 'file=C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\xkyce9lj.json', 'init=C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\q2yyhsm8.json', 'output', 'file=C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\prophet_model76sf41x6\prophet_model-20241009102001.csv', 'method=optimize', 'algorithm=lbfgs', 'iter=10000']1\AppData\Local\Temp\tmp5eionmg2\ttixvi4d.json
10:20:01 - cmdstanpy - INFO - Chain [1] start processing
INFO:cmdstanpy:Chain [1] start processing
10:20:01 - cmdstanpy - INFO - Chain [1] done processing
INFO:cmdstanpy:Chain [1] done processing
10:20:01 - cmdstanpy - ERROR - Chain [1] error: terminated by signal 3221225657
ERROR:cmdstanpy:Chain [1] error: terminated by signal 3221225657
WARNING:prophet.models:Optimization terminated abnormally. Falling back to Newton.
DEBUG:cmdstanpy:input tempfile: C:\Users\MURILO
DEBUG:cmdstanpy:input tempfile: C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\gagvaw1m.json1\AppData\Local\Temp\tmp5eionmg2\ttixvi4d.json', 'init=C:\Users\MURILO
DEBUG:cmdstanpy:idx 0
DEBUG:cmdstanpy:running CmdStan, num_threads: None
DEBUG:cmdstanpy:CmdStan args: ['C:\Users\MuriloXavierDeSousa\PycharmProjects\learn\.venv\Lib\site-packages\prophet\stan_model\prophet_model.bin', 'random', 'seed=5620', 'data', 'file=C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\gagvaw1m.json', 'output', 'file=C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\prophet_model_gu0c5sw\prophet_model-20241009102001.csv', 'method=optimize', 'algorithm=newton', 'iter=10000']
10:20:01 - cmdstanpy - INFO - Chain [1] start processing
INFO:cmdstanpy:Chain [1] start processing
10:20:01 - cmdstanpy - INFO - Chain [1] done processing
INFO:cmdstanpy:Chain [1] done processing
10:20:01 - cmdstanpy - ERROR - Chain [1] error: terminated by signal 3221225657
ERROR:cmdstanpy:Chain [1] error: terminated by signal 3221225657
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2024.1.4\plugins\python-ce\helpers\pydev_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "", line 1, in
File "C:\Users\MuriloXavierDeSousa\PycharmProjects\learn.venv\Lib\site-packages\prophet\forecaster.py", line 1181, in fit
self.params = self.stan_backend.fit(stan_init, dat, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MuriloXavierDeSousa\PycharmProjects\learn.venv\Lib\site-packages\prophet\models.py", line 97, in fit
self.stan_fit = self.model.optimize(**args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MuriloXavierDeSousa\PycharmProjects\learn.venv\Lib\site-packages\cmdstanpy\model.py", line 659, in optimize
raise RuntimeError(msg)
RuntimeError: Error during optimization! Command 'C:\Users\MuriloXavierDeSousa\PycharmProjects\learn.venv\Lib\site-packages\prophet\stan_model\prophet_model.bin random seed=5620 data file=C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\ttixvi4d.json init=C:\Users\MURILO1\AppData\Local\Temp\tmp5eionmg2\gagvaw1m.json output file=C:\Users\MURILO~1\AppData\Local\Temp\tmp5eionmg2\prophet_model_gu0c5sw\prophet_model-20241009102001.csv method=optimize algorithm=newton iter=10000' failed:
- Dominant language
- Python
- Stars
- 20.5k
- Forks
- 4.6k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from facebook/prophet
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Linux x86-64 wheel: overlapping ELF load pages in prophet_model.bin on Linux 4.18 kernelsPossibly taken @nicolasdalsass claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
make_future_dataframe returns 1970 dates when `ds` is an integer columnPossibly taken @k0nnect claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
model_to_json drops the fitted regressor predictor; deserialized model can't predictPossibly taken @caiotheodoro claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
plot_components fails for logistic models with minmax scaling and no floorPossibly taken @RaphaelFakhri claimed this 38 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in facebook/prophet
Similar issues
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
h2oai/h2o-llmstudio#1163 ·
Maintainers usually reply within 1 day