gs-quant icon indicating copy to clipboard operation
gs-quant copied to clipboard

statsmodels upgrade

Open jabbera opened this issue 3 years ago • 3 comments

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:

https://github.com/goldmansachs/gs-quant/blob/1272790ae3eb43819f80a0ad5053a36b349e9a3d/setup.py#L76-L77

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.

jabbera avatar Apr 04 '22 01:04 jabbera

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

theavey avatar Apr 29 '22 14:04 theavey

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

S-Manglik avatar Jun 01 '22 14:06 S-Manglik

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

was this intentional?

jabbera avatar Aug 22 '22 14:08 jabbera