Closed candalfigomoro closed 3 years ago
I should start by saying I don't have a very deep understanding of the whole conda forge build process. I also am not able to replicate this on my local (Linux) machine: I created a fresh conda environment
Python 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:22:27)
[GCC 9.3.0] on linux
and did
conda activate tmp
conda install -c conda-forge prophet
it installed all of the dependencies, and the package worked and I could fit the model.
So given that it works for me locally and given that CI is working here, I'm not sure how to debug this other than if I make a change and then you can see if it worked. I'll try reverting the noarch change and we can see what that does?...
OK can you see if #3 fixed it? Now when you install from conda forge you should see "_1" at the end of the build number, like
package | build
---------------------------|-----------------
prophet-1.0.1 | py38ha770c72_1 694 KB conda-forge
to know that you're installing the updated package.
@bletham I've tried the new package on my Windows machine. Now I get a similar but different error:
>>> import pandas as pd
>>> from prophet import Prophet
Importing plotly failed. Interactive plots will not work.
>>> df = pd.read_csv('example_wp_log_peyton_manning.csv')
>>> m = Prophet()
WARNING:pystan:numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.
>>> m.fit(df)
INFO:numexpr.utils:NumExpr defaulting to 4 threads.
INFO:prophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\XXXXXXX\Anaconda3\lib\site-packages\prophet\forecaster.py", line 1171, in fit
self.params = self.stan_backend.fit(stan_init, dat, **kwargs)
File "C:\Users\XXXXXXX\Anaconda3\lib\site-packages\prophet\models.py", line 264, in fit
self.stan_fit = self.model.optimizing(**args)
File "C:\Users\XXXXXXX\Anaconda3\lib\site-packages\pystan\model.py", line 542, in optimizing
fit = self.fit_class(data, seed)
AttributeError: 'StanModel' object has no attribute 'fit_class'
As a side note, at least it works on my Linux environment now! So removing "noarch" seems beneficial.
Well that definitely sounds like progress! It seems that there is a difference between something in the C++ toolchain (or maybe in numpy) between the package build and the run environment. I made a change in #5 to create build 2, can you try in windows with this new build and see if it helps?
Well that definitely sounds like progress! It seems that there is a difference between something in the C++ toolchain (or maybe in numpy) between the package build and the run environment. I made a change in #5 to create build 2, can you try in windows with this new build and see if it helps?
@bletham With the build 2, I still get the same error in Windows (I've also tried it on another Windows system and I get the same error):
Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from prophet import Prophet
Importing plotly failed. Interactive plots will not work.
>>> m = Prophet()
WARNING:pystan:numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.
@bletham Please note that on Windows I use anaconda's numpy 1.19.2 (which is also compiled against Intel MKL etc.)
If you read here https://stackoverflow.com/a/66743692 they say that the issue could be related to an incompatibility with numpy 1.20 (the C API changed).
The latest numpy version on conda-forge is 1.20.2, so this could be the issue. Maybe it will disappear when Anaconda will update numpy to 1.20.x
At this point, maybe you can revert the "m2w64-toolchain" requirement?
I see, so it's a difference in the numpy version between build and install. I'm a bit fuzzy on how the pinning works in conda forge but I just pushed a package (build 3) that might fix this, could you try? If it doesn't then I'll try just pinning to numpy either >=1.20 or <=1.19.
I'd say everything is working fine!
Kudos
Excellent! Thanks for your help in getting this to work, I was more or less stabbing in the dark and this wouldn't have gotten working without your help!
Issue: I get the
AttributeError: 'Prophet' object has no attribute 'stan_backend'
error (or apystan:Something went wrong while unpickling the StanModel. Consider recompiling.
error on another machine) with this new "prophet" package, while the old "fbprophet 0.7.1" package (feedstock: https://github.com/conda-forge/fbprophet-feedstock/) works fine on all environments.Details:
Some information about my Windows-based environment (but I get errors also on a Linux server). In the same environments, the old "fbprophet" package works fine. The prophet 1.0.1 package installed from pypi seems to work fine, so this issue appears specific to the new "prophet" conda-forge package.
Environment (
conda list
):Details about
conda
and system (conda info
):