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

[BUG] AutoARIMA returns "TypeError: function takes exactly 17 arguments (18 given)" #6263

Open
edoardoCame opened this issue Jan 27, 2025 · 3 comments
Labels
? - Needs Triage Need team to review and classify bug Something isn't working

Comments

@edoardoCame
Copy link

Describe the bug
Hi, I'm using a GTX 1080 to fit an AutoARIMA model to some sample financial data (time series data) stored into a cuDF dataframe.
I'm using cuML version 23.12 since it was the last version to support the Pascal nvidia series (like my gtx 1080).

Steps/Code to reproduce bug

Image

from cuml.tsa.auto_arima import AutoARIMA

model = AutoARIMA(df)
model.search(s=60, maxiter=100)
model.fit(method="css-ml")
fc = model.forecast(20)

First, it proceeds succesfully in these steps:


[I] [10:14:07.346790] Deciding D...
[I] [10:28:54.761513] Deciding d...
[I] [10:28:55.156008] Deciding p, q, P, Q, k...

But then it stops and this is the output:

Image


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[3], line 4
      1 from cuml.tsa.auto_arima import AutoARIMA
      3 model = AutoARIMA(df)
----> 4 model.search(s=60, maxiter=100)
      5 model.fit(method="css-ml")
      6 fc = model.forecast(20)

File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/cuml/internals/api_decorators.py:190, in _make_decorator_function.<locals>.decorator_function.<locals>.decorator_closure.<locals>.wrapper(*args, **kwargs)
    188         ret = func(*args, **kwargs)
    189     else:
--> 190         return func(*args, **kwargs)
    192 return cm.process_return(ret)

File auto_arima.pyx:409, in cuml.tsa.auto_arima.AutoARIMA.search()

File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/cuml/internals/api_decorators.py:188, in _make_decorator_function.<locals>.decorator_function.<locals>.decorator_closure.<locals>.wrapper(*args, **kwargs)
    185     set_api_output_dtype(output_dtype)
    187 if process_return:
--> 188     ret = func(*args, **kwargs)
    189 else:
    190     return func(*args, **kwargs)

File arima.pyx:930, in cuml.tsa.arima.ARIMA.fit()

File arima.pyx:905, in cuml.tsa.arima.ARIMA.fit.fit_helper()

File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/nvtx/nvtx.py:116, in annotate.__call__.<locals>.inner(*args, **kwargs)
    113 @wraps(func)
    114 def inner(*args, **kwargs):
    115     libnvtx_push_range(self.attributes, self.domain.handle)
--> 116     result = func(*args, **kwargs)
    117     libnvtx_pop_range(self.domain.handle)
    118     return result

File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/cuml/tsa/batched_lbfgs.py:165, in batched_fmin_lbfgs_b(func, x0, num_batches, fprime, args, bounds, m, factr, pgtol, epsilon, iprint, maxiter, maxls)
    162     if converged[ib]:
    163         continue
--> 165     _lbfgsb.setulb(
    166         m,
    167         x[ib],
    168         low_bnd,
    169         upper_bnd,
    170         nbd,
    171         f[ib],
    172         g[ib],
    173         factr,
    174         pgtol,
    175         wa[ib],
    176         iwa[ib],
    177         task[ib],
    178         iprint,
    179         csave[ib],
    180         lsave[ib],
    181         isave[ib],
    182         dsave[ib],
    183         maxls,
    184     )
    186 xk = np.concatenate(x)
    187 fk = func(xk)

TypeError: function takes exactly 17 arguments (18 given)

Environment details (please complete the following information):

  • Linux Distro/Architecture: Ubuntu 24
  • GPU Model: Gtx 1080 with the latest driver available
  • Method of cuDF & cuML install: conda, and conda list:

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
asttokens                 3.0.0              pyhd8ed1ab_1    conda-forge
attr                      2.5.1                h166bdaf_1    conda-forge
aws-c-auth                0.7.20               h5f1c8d9_0    conda-forge
aws-c-cal                 0.6.12               h2ba76a8_0    conda-forge
aws-c-common              0.9.17               h4ab18f5_0    conda-forge
aws-c-compression         0.2.18               h36a0aea_4    conda-forge
aws-c-event-stream        0.4.2               h161de36_10    conda-forge
aws-c-http                0.8.1               h63f54a0_13    conda-forge
aws-c-io                  0.14.8               h96d4d28_0    conda-forge
aws-c-mqtt                0.10.4               hcc7299c_2    conda-forge
aws-c-s3                  0.5.9                h10bd90f_0    conda-forge
aws-c-sdkutils            0.1.16               h36a0aea_0    conda-forge
aws-checksums             0.1.18               h36a0aea_4    conda-forge
aws-crt-cpp               0.26.8              h4f3a3cc_11    conda-forge
aws-sdk-cpp               1.11.267             h51dfee4_8    conda-forge
bokeh                     3.6.2              pyhd8ed1ab_1    conda-forge
brotli-python             1.1.0           py310hf71b8c6_2    conda-forge
bzip2                     1.0.8                h4bc722e_7    conda-forge
c-ares                    1.34.4               hb9d3cd8_0    conda-forge
ca-certificates           2024.12.14           hbcca054_0    conda-forge
cachetools                5.5.1              pyhd8ed1ab_0    conda-forge
cffi                      1.17.1          py310h8deb56e_0    conda-forge
click                     8.1.8              pyh707e725_0    conda-forge
cloudpickle               3.1.1              pyhd8ed1ab_0    conda-forge
comm                      0.2.2              pyhd8ed1ab_1    conda-forge
contourpy                 1.3.1           py310h3788b33_0    conda-forge
cuda-cccl_linux-64        12.5.39              ha770c72_0    conda-forge
cuda-crt-dev_linux-64     12.5.82              ha770c72_0    conda-forge
cuda-crt-tools            12.5.82              ha770c72_0    conda-forge
cuda-cudart               12.5.82              he02047a_0    conda-forge
cuda-cudart-dev           12.5.82              he02047a_0    conda-forge
cuda-cudart-dev_linux-64  12.5.82              h85509e4_0    conda-forge
cuda-cudart-static        12.5.82              he02047a_0    conda-forge
cuda-cudart-static_linux-64 12.5.82              h85509e4_0    conda-forge
cuda-cudart_linux-64      12.5.82              h85509e4_0    conda-forge
cuda-nvcc-dev_linux-64    12.5.82              ha770c72_0    conda-forge
cuda-nvcc-impl            12.5.82              hd3aeb46_0    conda-forge
cuda-nvcc-tools           12.5.82              hd3aeb46_0    conda-forge
cuda-nvrtc                12.5.82              he02047a_0    conda-forge
cuda-nvvm-dev_linux-64    12.5.82              ha770c72_0    conda-forge
cuda-nvvm-impl            12.5.82              h59595ed_0    conda-forge
cuda-nvvm-tools           12.5.82              h59595ed_0    conda-forge
cuda-profiler-api         12.5.39              ha770c72_0    conda-forge
cuda-python               12.6.2          py310h521d3fa_2    conda-forge
cuda-version              12.5                 hd4f0392_3    conda-forge
cudf                      23.12.01        cuda12_py310_231208_g2ce46216b5_0    rapidsai
cuml                      23.12.00        cuda12_py310_231206_gad2bd2b65_0    rapidsai
cupy                      13.3.0          py310h1b77274_2    conda-forge
cupy-core                 13.3.0          py310h8de46e0_2    conda-forge
cytoolz                   1.0.1           py310ha75aee5_0    conda-forge
dask                      2023.11.0          pyhd8ed1ab_0    conda-forge
dask-core                 2023.11.0          pyhd8ed1ab_0    conda-forge
dask-cuda                 23.12.00        py310_231206_ge1638ae_0    rapidsai
dask-cudf                 23.12.01        cuda12_py310_231208_g2ce46216b5_0    rapidsai
debugpy                   1.8.12          py310hf71b8c6_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_1    conda-forge
distributed               2023.11.0          pyhd8ed1ab_0    conda-forge
dlpack                    0.5                  h9c3ff4c_0    conda-forge
exceptiongroup            1.2.2              pyhd8ed1ab_1    conda-forge
executing                 2.1.0              pyhd8ed1ab_1    conda-forge
fastrlock                 0.8.3           py310h8c668a6_1    conda-forge
fmt                       9.1.0                h924138e_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
fsspec                    2024.12.0          pyhd8ed1ab_0    conda-forge
gflags                    2.2.2             h5888daf_1005    conda-forge
glog                      0.7.1                hbabe93e_0    conda-forge
gmock                     1.15.2               ha770c72_0    conda-forge
gtest                     1.15.2               h434a139_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_1    conda-forge
hpack                     4.1.0              pyhd8ed1ab_0    conda-forge
hyperframe                6.1.0              pyhd8ed1ab_0    conda-forge
importlib-metadata        8.6.1              pyha770c72_0    conda-forge
importlib_metadata        8.6.1                hd8ed1ab_0    conda-forge
ipykernel                 6.29.5             pyh3099207_0    conda-forge
ipython                   8.31.0             pyh707e725_0    conda-forge
jedi                      0.19.2             pyhd8ed1ab_1    conda-forge
jinja2                    3.1.5              pyhd8ed1ab_0    conda-forge
joblib                    1.4.2              pyhd8ed1ab_1    conda-forge
jupyter_client            8.6.3              pyhd8ed1ab_1    conda-forge
jupyter_core              5.7.2              pyh31011fe_1    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.3               h659f571_0    conda-forge
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.43                 h712a8e2_2    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libabseil                 20240116.2      cxx17_he02047a_1    conda-forge
libarrow                  14.0.2          hefa796f_19_cpu    conda-forge
libarrow-acero            14.0.2          hbabe93e_19_cpu    conda-forge
libarrow-dataset          14.0.2          hbabe93e_19_cpu    conda-forge
libarrow-flight           14.0.2          hc4f8a93_19_cpu    conda-forge
libarrow-flight-sql       14.0.2          he4f5ca8_19_cpu    conda-forge
libarrow-gandiva          14.0.2          hc1954e9_19_cpu    conda-forge
libarrow-substrait        14.0.2          he4f5ca8_19_cpu    conda-forge
libblas                   3.9.0           26_linux64_openblas    conda-forge
libbrotlicommon           1.1.0                hb9d3cd8_2    conda-forge
libbrotlidec              1.1.0                hb9d3cd8_2    conda-forge
libbrotlienc              1.1.0                hb9d3cd8_2    conda-forge
libcap                    2.71                 h39aace5_0    conda-forge
libcblas                  3.9.0           26_linux64_openblas    conda-forge
libcrc32c                 1.1.2                h9c3ff4c_0    conda-forge
libcublas                 12.5.3.2             he02047a_0    conda-forge
libcublas-dev             12.5.3.2             he02047a_0    conda-forge
libcudf                   23.12.01        cuda12_231208_g2ce46216b5_0    rapidsai
libcufft                  11.2.3.61            he02047a_0    conda-forge
libcufile                 1.10.1.7             he02047a_0    conda-forge
libcufile-dev             1.10.1.7             he02047a_0    conda-forge
libcuml                   23.12.00        cuda12_231206_gad2bd2b65_0    rapidsai
libcumlprims              23.12.00        cuda12_231206_gc120fe0_0    nvidia
libcurand                 10.3.6.82            he02047a_0    conda-forge
libcurand-dev             10.3.6.82            he02047a_0    conda-forge
libcurl                   8.11.1               h332b0f4_0    conda-forge
libcusolver               11.6.3.83            he02047a_0    conda-forge
libcusolver-dev           11.6.3.83            he02047a_0    conda-forge
libcusparse               12.5.1.3             he02047a_0    conda-forge
libcusparse-dev           12.5.1.3             he02047a_0    conda-forge
libdeflate                1.23                 h4ddbbb0_0    conda-forge
libedit                   3.1.20240808    pl5321h7949ede_0    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc                    14.2.0               h77fa898_1    conda-forge
libgcc-ng                 14.2.0               h69a702a_1    conda-forge
libgcrypt-lib             1.11.0               hb9d3cd8_2    conda-forge
libgfortran               14.2.0               h69a702a_1    conda-forge
libgfortran5              14.2.0               hd5240d6_1    conda-forge
libgomp                   14.2.0               h77fa898_1    conda-forge
libgoogle-cloud           2.23.0               h9be4e54_1    conda-forge
libgoogle-cloud-storage   2.23.0               hc7a4891_1    conda-forge
libgpg-error              1.51                 hbd13f7d_1    conda-forge
libgrpc                   1.62.2               h15f2491_0    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
libkvikio                 23.12.00        cuda12_231206_gf90bfbe_0    rapidsai
liblapack                 3.9.0           26_linux64_openblas    conda-forge
libllvm14                 14.0.6               hcd5def8_4    conda-forge
libllvm15                 15.0.7               hb3ce162_4    conda-forge
liblzma                   5.6.3                hb9d3cd8_1    conda-forge
liblzma-devel             5.6.3                hb9d3cd8_1    conda-forge
libnghttp2                1.64.0               h161d5f1_0    conda-forge
libnl                     3.11.0               hb9d3cd8_0    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libnvjitlink              12.5.82              he02047a_0    conda-forge
libopenblas               0.3.28          pthreads_h94d23a6_1    conda-forge
libparquet                14.0.2          hacf5a1f_19_cpu    conda-forge
libpng                    1.6.46               h943b412_0    conda-forge
libprotobuf               4.25.3               hd5b35b9_1    conda-forge
libraft                   23.12.00        cuda12_231206_g9e2d6277_0    rapidsai
libraft-headers           23.12.00        cuda12_231206_g9e2d6277_0    rapidsai
libraft-headers-only      23.12.00        cuda12_231206_g9e2d6277_0    rapidsai
libre2-11                 2023.09.01           h5a48ba9_2    conda-forge
librmm                    23.12.00        cuda12_231206_g2db5cbb3_0    rapidsai
libsodium                 1.0.20               h4ab18f5_0    conda-forge
libsqlite                 3.48.0               hee588c1_1    conda-forge
libssh2                   1.11.1               hf672d98_0    conda-forge
libstdcxx                 14.2.0               hc0a3c3a_1    conda-forge
libstdcxx-ng              14.2.0               h4852527_1    conda-forge
libsystemd0               256.9                h2774228_0    conda-forge
libthrift                 0.19.0               hb90f79a_1    conda-forge
libtiff                   4.7.0                hd9ff511_3    conda-forge
libudev1                  257.2                h9a4d06a_0    conda-forge
libutf8proc               2.8.0                hf23e847_1    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libwebp-base              1.5.0                h851e524_0    conda-forge
libxcb                    1.17.0               h8a09558_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxml2                   2.13.5               h0d44e9d_1    conda-forge
libzlib                   1.3.1                hb9d3cd8_2    conda-forge
llvmlite                  0.40.1          py310h1b8f574_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
lz4                       4.3.3           py310hb259640_1    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_1    conda-forge
markupsafe                3.0.2           py310h89163eb_1    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_1    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_1    conda-forge
msgpack-python            1.1.0           py310h3788b33_0    conda-forge
nccl                      2.24.3.1             hb92ee24_0    conda-forge
ncurses                   6.5                  h2d0b736_2    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_1    conda-forge
numba                     0.57.1          py310h0f6aa51_0    conda-forge
numpy                     1.24.4          py310ha4c1d20_0    conda-forge
nvcomp                    3.0.4                h10b603f_1    conda-forge
nvtx                      0.2.10          py310ha75aee5_2    conda-forge
openjpeg                  2.5.3                h5fbd93e_0    conda-forge
openssl                   3.4.0                h7b32b05_1    conda-forge
orc                       2.0.0                h17fec99_1    conda-forge
packaging                 24.2               pyhd8ed1ab_2    conda-forge
pandas                    1.5.3           py310h9b08913_1    conda-forge
parso                     0.8.4              pyhd8ed1ab_1    conda-forge
partd                     1.4.2              pyhd8ed1ab_0    conda-forge
patsy                     1.0.1                    pypi_0    pypi
pexpect                   4.9.0              pyhd8ed1ab_1    conda-forge
pickleshare               0.7.5           pyhd8ed1ab_1004    conda-forge
pillow                    11.1.0          py310h7e6dc6c_0    conda-forge
pip                       25.0               pyh8b19718_0    conda-forge
platformdirs              4.3.6              pyhd8ed1ab_1    conda-forge
prompt-toolkit            3.0.50             pyha770c72_0    conda-forge
protobuf                  4.25.3          py310h0e2eeba_1    conda-forge
psutil                    6.1.1           py310ha75aee5_0    conda-forge
pthread-stubs             0.4               hb9d3cd8_1002    conda-forge
ptyprocess                0.7.0              pyhd8ed1ab_1    conda-forge
pure_eval                 0.2.3              pyhd8ed1ab_1    conda-forge
pyarrow                   14.0.2          py310hd207890_19_cpu    conda-forge
pyarrow-hotfix            0.6                pyhd8ed1ab_1    conda-forge
pycparser                 2.22               pyh29332c3_1    conda-forge
pygments                  2.19.1             pyhd8ed1ab_0    conda-forge
pylibraft                 23.12.00        cuda12_py310_231206_g9e2d6277_0    rapidsai
pynvml                    11.4.1             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha55dd90_7    conda-forge
python                    3.10.16         he725a3c_1_cpython    conda-forge
python-dateutil           2.9.0.post0        pyhff2d567_1    conda-forge
python_abi                3.10                    5_cp310    conda-forge
pytz                      2024.2             pyhd8ed1ab_1    conda-forge
pyyaml                    6.0.2           py310h89163eb_2    conda-forge
pyzmq                     26.2.0          py310h71f11fc_3    conda-forge
raft-dask                 23.12.00        cuda12_py310_231206_g9e2d6277_0    rapidsai
rapids-dask-dependency    23.12.01                      0    rapidsai
rdma-core                 55.0                 h5888daf_0    conda-forge
re2                       2023.09.01           h7f4b329_2    conda-forge
readline                  8.2                  h8228510_1    conda-forge
rich                      13.9.4             pyhd8ed1ab_1    conda-forge
rmm                       23.12.00        cuda12_py310_231206_g2db5cbb3_0    rapidsai
s2n                       1.4.13               he19d79f_0    conda-forge
scipy                     1.15.1          py310hfa6ec8c_0    conda-forge
setuptools                75.8.0             pyhff2d567_0    conda-forge
six                       1.17.0             pyhd8ed1ab_0    conda-forge
snappy                    1.2.1                h8bd8927_1    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
spdlog                    1.11.0               h9b3ece8_1    conda-forge
stack_data                0.6.3              pyhd8ed1ab_1    conda-forge
statsmodels               0.14.4                   pypi_0    pypi
tblib                     3.0.0              pyhd8ed1ab_1    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toolz                     1.0.0              pyhd8ed1ab_1    conda-forge
tornado                   6.4.2           py310ha75aee5_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_1    conda-forge
treelite                  3.9.1           py310h4a6579d_0    conda-forge
treelite-runtime          3.9.1                    pypi_0    pypi
typing_extensions         4.12.2             pyha770c72_1    conda-forge
tzdata                    2025a                h78e105d_0    conda-forge
ucx                       1.15.0               hda83522_8    conda-forge
ucx-proc                  1.0.0                       gpu    rapidsai
ucx-py                    0.35.00         py310_231206_gb5f60ca_0    rapidsai
urllib3                   2.3.0              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_1    conda-forge
wheel                     0.45.1             pyhd8ed1ab_1    conda-forge
xorg-libxau               1.0.12               hb9d3cd8_0    conda-forge
xorg-libxdmcp             1.1.5                hb9d3cd8_0    conda-forge
xyzservices               2025.1.0           pyhd8ed1ab_0    conda-forge
xz                        5.6.3                hbcc6ac9_1    conda-forge
xz-gpl-tools              5.6.3                hbcc6ac9_1    conda-forge
xz-tools                  5.6.3                hb9d3cd8_1    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zeromq                    4.3.5                h3b0a872_7    conda-forge
zict                      3.0.0              pyhd8ed1ab_1    conda-forge
zipp                      3.21.0             pyhd8ed1ab_1    conda-forge
zstandard                 0.23.0          py310ha39cb0e_1    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge
@edoardoCame edoardoCame added ? - Needs Triage Need team to review and classify bug Something isn't working labels Jan 27, 2025
@betatim
Copy link
Member

betatim commented Jan 27, 2025

Could you try using a scipy version from before 1.15?

I think what you are seeing is similar to #6207 In scipy v1.15 they made a change to an internal API that cuml uses. For the older version of cuml that you are using I think the older scipy version should be a fix.

edit: fixed the PR I linked to

@edoardoCame
Copy link
Author

Could you try using a scipy version from before 1.15?

I think what you are seeing is similar to #6213 In scipy v1.15 they made a change to an internal API that cuml uses. For the older version of cuml that you are using I think the older scipy version should be a fix.

Thanks for the reply. I tried by running pip install 'scipy<1.15' and it succesfully downgraded scipy to 1.14. Unfortunately, when using autoarima, it returns the same exact error.

@betatim
Copy link
Member

betatim commented Jan 27, 2025

Just to double check: are you sure the version of scipy that you installed with pip is being used? You could check with something like starting python/a notebook and looking at the output of

import scipy
scipy.__version__

The reason I'm asking is that your initial conda list shows that you installed things from conda-forge/via conda. So just trying to make sure there was no mixup.

note: I edited my previous comment to link to the PR I wanted to link to. Sorry for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants