Skip to content
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

statsmodels upgrade #233

Open
jabbera opened this issue Apr 4, 2022 · 3 comments
Open

statsmodels upgrade #233

jabbera opened this issue Apr 4, 2022 · 3 comments

Comments

@jabbera
Copy link

jabbera commented Apr 4, 2022

Describe the problem.
statsmodels < 13 can't be installed with scipy >= 1.8.0: https://stackoverflow.com/questions/71106940/cannot-import-name-centered-from-scipy-signal-signaltools

This is a valid configuration per this projects setup.py:

gs-quant/setup.py

Lines 76 to 77 in 1272790

"scipy>=1.2.0,<=1.8.0;python_version>'3.6'",
"statsmodels>=0.11.1,<0.13.0",

Repro:

python3 -m venv .venv
source .venv/bin/activate
pip install gs-quant
python -c "from statsmodels.api import OLS"

Traceback:

  from pandas import (to_datetime, Int64Index, DatetimeIndex, Period,
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jabbera/stats/.venv/lib/python3.8/site-packages/statsmodels/api.py", line 27, in <module>
    from .tsa import api as tsa
  File "/home/jabbera/stats/.venv/lib/python3.8/site-packages/statsmodels/tsa/api.py", line 31, in <module>
    from .filters import api as filters
  File "/home/jabbera/stats/.venv/lib/python3.8/site-packages/statsmodels/tsa/filters/api.py", line 6, in <module>
    from .filtertools import miso_lfilter, convolution_filter, recursive_filter
  File "/home/jabbera/stats/.venv/lib/python3.8/site-packages/statsmodels/tsa/filters/filtertools.py", line 18, in <module>
    from scipy.signal.signaltools import _centered as trim_centered
ImportError: cannot import name '_centered' from 'scipy.signal.signaltools' (/home/jabbera/stats/.venv/lib/python3.8/site-packages/scipy/signal/signaltools.py)

Describe the solution you'd like
Remove the requirement for statsmodels < 13. I really don't want to be pinned to scipy < 1.8.0

Describe alternatives you've considered
Downgrade scipy.

Are you willing to contribute
Need to check with my legal department.

@theavey
Copy link

theavey commented Apr 29, 2022

Agree that this is an issue. Would be at least nice to know why the statsmodels version is capped

@S-Manglik
Copy link
Collaborator

Statsmodels is now unpinned and we are working on unpinning scipy.

@jabbera
Copy link
Author

jabbera commented Aug 22, 2022

@S-Manglik this change was rolled back here: https://github.com/goldmansachs/gs-quant/pull/253/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7

was this intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants