-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StanModel' object has no attribute 'fit_class' Error #249
Comments
Sorry, but nobody could help me with the above issue? |
To be able to isolate the issue, could you check if pystan is working?
|
@bletham Thanks for your help. Yes, it does give me the result: 0.017287202743671251. It's weird FB doesn't even address this issue in the FAQ for FB prophet;p |
I'm sorry to say that I'm really not sure what is happening here. Could you try re-installing fbprophet and seeing if there are any errors / warnings during install? If you're using Anaconda then |
Actually I think the issue is something with the numpy installation. Notice the warning that Pystan is giving about not being able to import numpy multiarray. Are you able to Could you upgrade numpy to the latest version, and perhaps also pystan? |
the pystan and fbprophet's isn't suitable, change the version will be fine. |
which version do you use? |
This fixed it for me |
I am having exactly the same problem when I instantiate the prophet model with:
|
this is my package version, maybe will help you to solve your problem.
pystan 2.17.1.0
fbprophet 0.3.post2
I think pystan version is not ok.
From: Jose Luis Martinez <notifications@github.com>
Date: 2019-01-04 11:19:58
To: facebook/prophet <prophet@noreply.github.com>
Cc: zerogouzi <g20178600@xs.ustb.edu.cn>,Comment <comment@noreply.github.com>
Subject: Re: [facebook/prophet] StanModel' object has no attribute 'fit_class' Error (#249)
I am having exactly the same roblem when I instantiate the prophet model with:
m = Prophet()
m.fit(df)
I got:
AttributeError Traceback (most recent call last)
<ipython-input-15-1ab3c9387252> in <module>
1 m = Prophet()
----> 2 m.fit(df)
~\Anaconda3\envs\PystanandProphet\lib\site-packages\fbprophet\forecaster.py in fit(self, df, **kwargs)
~\Anaconda3\envs\PystanandProphet\lib\site-packages\pystan\model.py in optimizing(self, data, seed, init, sample_file, algorithm, verbose, as_vector, **kwargs)
470 data = {}
471 seed = pystan.misc._check_seed(seed)
--> 472 fit = self.fit_class(data, seed)
473
474 m_pars = fit._get_param_names()
AttributeError: 'StanModel' object has no attribute 'fit_class'
I tried to install fbprophet 0.3.post2, , but got the same...
Any suggestion?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
As Sean described in #775, the current issue was not a locally-cached whl (as it was in this issue, and as I had initially thought in #775), but rather it was that we had inadvertently put a whl on pypi. We removed the whl on pypi, and so this issue should now be resolved (again!) and if you pip install it should build properly. |
how to fix this error. ERROR: Command errored out with exit status 1: |
I got the following error message when trying to use the "fit" feature. I ran Python on Anaconda environment, with Pystan's 2.14 version, Pandas's 0.20.2 version, and Python's 3.5 version. I don't understand why I encounter this issue, so could anyone please help?
Error Message:
'WARNING:pystan:numpy.core.multiarray failed to import
WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.
RuntimeError Traceback (most recent call last)
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
WARNING:pystan:numpy.core.multiarray failed to import
WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.
Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this.
AttributeError Traceback (most recent call last)
in ()
11 HAN_BIKE["ds"] = HAN_BIKE["ds"].values.astype('datetime64[D]')
12 m = Prophet()
---> 13 m.fit(HAN_BIKE)
/Applications/anaconda/lib/python3.5/site-packages/fbprophet/forecaster.py in fit(self, df, **kwargs)
533
534 else:
--> 535 params = model.optimizing(dat, init=stan_init, iter=1e4, **kwargs)
536 for par in params:
537 self.params[par] = params[par].reshape((1, -1))
/Applications/anaconda/lib/python3.5/site-packages/pystan/model.py in optimizing(self, data, seed, init, sample_file, algorithm, verbose, as_vector, **kwargs)
466 data = {}
467
--> 468 fit = self.fit_class(data)
469
470 m_pars = fit._get_param_names()
AttributeError: 'StanModel' object has no attribute 'fit_class''
The text was updated successfully, but these errors were encountered: