rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.22k stars 530 forks source link

[BUG] ElasticNet fit time is slow with high variance on close to rank deficient matrices #4122

Open pdimitrov-nv opened 3 years ago

pdimitrov-nv commented 3 years ago

Describe the bug cuml.ElasticNet (and Lasso) perform much slower than expected. shady_lea_X.zip shady_lea_y.zip

These data size are X.shape=(1345, 934); Y.shape=(1345,)

Note that the default alpha=1 is fast, but alpha=0.1, alpha=0.01 get progressively slower, then alpha=0.001 faster again...

Steps/Code to reproduce bug Here is a file "slowElasticNet.py that reproduces the behavior using the uploaded data files.

import pandas as pd
import numpy as np
import numpy
import matplotlib.pyplot as plt
from sklearn.linear_model import Lasso, LassoCV, Ridge, LinearRegression, ElasticNet, MultiTaskElasticNetCV, RidgeCV
from sklearn.decomposition import TruncatedSVD
from cuml import ElasticNet as cuElasticNet
import cuml
import cudf, cupy

import time
def eprint(*args, **kwargs):
    import sys

    print(*args, file=sys.stderr, **kwargs)

class TimeIt(object):
    def __init__(self, task_str, printf=eprint):
        self.print = printf
        self.s = task_str.ljust(35)

    def __enter__(self):
        self.t0 = time.time()
        return

    def __exit__(self, type, value, traceback):
        t1 = time.time()
        ts = f"{t1-self.t0:,.3f}".rjust(10)
        self.print(f"{self.s} {ts} s")

#### LOAD DATA
path = '.' #'../data'
X_df = pd.read_csv(path+'/shady_lea_X.csv')
Y_df = pd.read_csv(path+'/shady_lea_y.csv')

#### Move data to GPU
col = 97
cuX = cupy.array(X_df.values)
cuY = cupy.array(Y_df.values[:,col])

#### Fit model
alpha=0.1
for i in range(3):
    with TimeIt(f"[alpha={alpha}] [run {i+1}] cuElasticNet"):
        model=cuElasticNet(alpha=alpha)
        model.fit(cuX, cuY)
alpha=0.01    
for i in range(3):
    with TimeIt(f"[alpha={alpha}] [run {i+1}] cuElasticNet"):
        model=cuElasticNet(alpha=alpha)
        model.fit(cuX, cuY)

alpha=0.001
for i in range(3):
    with TimeIt(f"[alpha={alpha}] [run {i+1}] cuElasticNet"):
        model=cuElasticNet(alpha=alpha)
        model.fit(cuX, cuY)

======================== Observed behavior (output of code above)

python slowElasticNet.py
[alpha=0.1] [run 1] cuElasticNet         2.544 s
[alpha=0.1] [run 2] cuElasticNet         1.913 s
[alpha=0.1] [run 3] cuElasticNet         1.883 s

[alpha=0.01] [run 1] cuElasticNet        5.393 s
[alpha=0.01] [run 2] cuElasticNet        5.394 s
[alpha=0.01] [run 3] cuElasticNet        5.436 s

[alpha=0.001] [run 1] cuElasticNet       1.997 s
[alpha=0.001] [run 2] cuElasticNet       2.092 s
[alpha=0.001] [run 3] cuElasticNet       2.005 s

real    0m36.076s
user    0m33.253s
sys     0m8.838s

Expected behavior Subsecond speed instead of 5 seconds.

Environment details (please complete the following information):

conda list
# packages in environment at /gpfs/fs1/pdimitrov/work/utilidata/miniconda3/envs/rapids-0.19:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
abseil-cpp                20210324.0           h9c3ff4c_0    conda-forge
aiohttp                   3.7.4            py38h497a2fe_0    conda-forge
alsa-lib                  1.2.3                h516909a_0    conda-forge
anyio                     3.1.0            py38h578d9bd_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argon2-cffi               20.1.0           py38h497a2fe_2    conda-forge
arrow-cpp                 1.0.1           py38h27527b3_37_cuda    conda-forge
arrow-cpp-proc            3.0.0                      cuda    conda-forge
async-timeout             3.0.1                   py_1000    conda-forge
async_generator           1.10                       py_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
aws-c-cal                 0.5.10               h3622835_0    conda-forge
aws-c-common              0.5.11               h7f98852_0    conda-forge
aws-c-event-stream        0.2.7                hd2d8ebb_9    conda-forge
aws-c-io                  0.10.2               he6d800f_1    conda-forge
aws-checksums             0.1.11               hc0e0e8b_6    conda-forge
aws-sdk-cpp               1.8.186              h9ad65fb_2    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
blazingsql                0.19.1                   pypi_0    pypi
bleach                    3.3.0              pyh44b312d_0    conda-forge
bokeh                     2.2.3            py38h578d9bd_0    conda-forge
boost                     1.72.0           py38h1e42940_1    conda-forge
boost-cpp                 1.72.0               h9d3c048_4    conda-forge
brotli                    1.0.9                h9c3ff4c_4    conda-forge
brotlipy                  0.7.0           py38h497a2fe_1001    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.17.1               h7f98852_1    conda-forge
ca-certificates           2021.5.30            ha878542_0    conda-forge
cachetools                4.2.2              pyhd8ed1ab_0    conda-forge
cairo                     1.16.0            h6cf1ce9_1008    conda-forge
certifi                   2021.5.30        py38h578d9bd_0    conda-forge
cffi                      1.14.5           py38ha65f79e_0    conda-forge
cfitsio                   3.470                hb418390_7    conda-forge
chardet                   4.0.0            py38h578d9bd_1    conda-forge
click                     7.1.2              pyh9f0ad1d_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.7.2              pyhd8ed1ab_0    conda-forge
cloudpickle               1.6.0                      py_0    conda-forge
colorcet                  2.0.6              pyhd8ed1ab_0    conda-forge
cryptography              3.4.7            py38ha5dfef3_0    conda-forge
cudatoolkit               11.2.72              h2bc3f7f_0    nvidia
cudf                      0.19.2          cuda_11.2_py38_gab3b3f653a_0    rapidsai
cudf_kafka                0.19.2          py38_gab3b3f653a_0    rapidsai
cudnn                     8.1.0.77             h90431f1_0    conda-forge
cugraph                   0.19.0          py38_gd72b90b0_0    rapidsai
cuml                      0.19.0          cuda11.2_py38_g4cb78ff1a_0    rapidsai
cupy                      8.6.0            py38ha69542f_0    conda-forge
curl                      7.77.0               hea6ffbf_0    conda-forge
cusignal                  0.19.0          py38_g347b95a_0    rapidsai
cuspatial                 0.19.0          py38_gdf1d93c_0    rapidsai
custreamz                 0.19.2          py38_gab3b3f653a_0    rapidsai
cutensor                  1.2.2.5              h96e36e3_4    conda-forge
cuxfilter                 0.19.1          py38_g82dc80c_0    rapidsai
cycler                    0.10.0                   pypi_0    pypi
cyrus-sasl                2.1.27               h230043b_2    conda-forge
cytoolz                   0.11.0           py38h497a2fe_3    conda-forge
dask                      2021.4.0           pyhd8ed1ab_0    conda-forge
dask-core                 2021.4.0           pyhd8ed1ab_0    conda-forge
dask-cuda                 0.19.0                   py38_0    rapidsai
dask-cudf                 0.19.2          py38_gab3b3f653a_0    rapidsai
datashader                0.11.1             pyh9f0ad1d_0    conda-forge
datashape                 0.5.4                      py_1    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
distributed               2021.4.0         py38h578d9bd_0    conda-forge
dlpack                    0.3                  he1b5a44_1    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
expat                     2.4.1                h9c3ff4c_0    conda-forge
faiss-proc                1.0.0                      cuda    rapidsai
fastavro                  1.4.1            py38h497a2fe_0    conda-forge
fastrlock                 0.6              py38h709712a_0    conda-forge
fiona                     1.8.20           py38hdb5a769_0    conda-forge
fontconfig                2.13.1            hba837de_1005    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
freexl                    1.0.6                h7f98852_0    conda-forge
fsspec                    2021.6.0           pyhd8ed1ab_0    conda-forge
future                    0.18.2           py38h578d9bd_3    conda-forge
gdal                      3.2.2            py38h507a4fd_5    conda-forge
geopandas                 0.8.1                      py_0    conda-forge
geos                      3.9.1                h9c3ff4c_2    conda-forge
geotiff                   1.6.0                hcf90da6_5    conda-forge
gettext                   0.19.8.1          h0b5b191_1005    conda-forge
gflags                    2.2.2             he1b5a44_1004    conda-forge
giflib                    5.2.1                h36c2ea0_2    conda-forge
glog                      0.4.0                h49b9bf7_3    conda-forge
google-cloud-cpp          1.25.0               hc9b7cee_2    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
greenlet                  1.1.0            py38h709712a_0    conda-forge
grpc-cpp                  1.37.1               h36de60a_0    conda-forge
harfbuzz                  2.8.1                h83ec7ef_0    conda-forge
hdf4                      4.2.15               h10796ff_3    conda-forge
hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
icu                       68.1                 h58526e2_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
importlib-metadata        4.5.0            py38h578d9bd_0    conda-forge
ipykernel                 5.5.5            py38hd0cf306_0    conda-forge
ipython                   7.24.1           py38hd0cf306_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.3              pyhd3deb0d_0    conda-forge
jedi                      0.18.0           py38h578d9bd_2    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h36c2ea0_0    conda-forge
jpype1                    1.2.1            py38h1fd1430_0    conda-forge
json-c                    0.15                 h98cffda_0    conda-forge
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter-server-proxy      3.0.2              pyhd8ed1ab_0    conda-forge
jupyter_client            6.1.12             pyhd8ed1ab_0    conda-forge
jupyter_core              4.7.1            py38h578d9bd_0    conda-forge
jupyter_server            1.8.0              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_widgets        1.0.0              pyhd8ed1ab_1    conda-forge
kealib                    1.4.14               hcc255d8_2    conda-forge
kiwisolver                1.3.1                    pypi_0    pypi
krb5                      1.19.1               hcc1bbae_0    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.35.1               hea4e1c9_2    conda-forge
libblas                   3.9.0                9_openblas    conda-forge
libcblas                  3.9.0                9_openblas    conda-forge
libcrc32c                 1.1.1                h9c3ff4c_2    conda-forge
libcudf                   0.19.2          cuda11.2_gab3b3f653a_0    rapidsai
libcudf_kafka             0.19.2            gab3b3f653a_0    rapidsai
libcugraph                0.19.0          cuda11.2_gd72b90b0_0    rapidsai
libcuml                   0.19.0          cuda11.2_g4cb78ff1a_0    rapidsai
libcumlprims              0.19.0          cuda11.2_ga2abf9f_0    nvidia
libcurl                   7.77.0               h2574ce0_0    conda-forge
libcuspatial              0.19.0          cuda11.2_gdf1d93c_0    rapidsai
libdap4                   3.20.6               hd7c4107_2    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libevent                  2.1.10               hcdb4288_3    conda-forge
libfaiss                  1.7.0           cuda112h5bea7ad_8_cuda    conda-forge
libffi                    3.3                  h58526e2_2    conda-forge
libgcc-ng                 9.3.0               h2828fa1_19    conda-forge
libgcrypt                 1.9.3                h7f98852_1    conda-forge
libgdal                   3.2.2                h679344c_5    conda-forge
libgfortran-ng            9.3.0               hff62375_19    conda-forge
libgfortran5              9.3.0               hff62375_19    conda-forge
libglib                   2.68.2               h3e27bee_2    conda-forge
libgomp                   9.3.0               h2828fa1_19    conda-forge
libgpg-error              1.42                 h9c3ff4c_0    conda-forge
libgsasl                  1.8.0                         2    conda-forge
libhwloc                  2.3.0                h5e5b7d1_1    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
libkml                    1.3.0             hd79254b_1012    conda-forge
liblapack                 3.9.0                9_openblas    conda-forge
libllvm10                 10.0.1               he513fc3_3    conda-forge
libnetcdf                 4.8.0           nompi_hcd642e3_103    conda-forge
libnghttp2                1.43.0               h812cca2_0    conda-forge
libntlm                   1.4               h7f98852_1002    conda-forge
libopenblas               0.3.15          pthreads_h8fe5266_1    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libpq                     13.3                 hd57d9b9_0    conda-forge
libprotobuf               3.15.8               h780b84a_0    conda-forge
librdkafka                1.5.3                hc49e61c_1    conda-forge
librmm                    0.19.0          cuda11.2_g7065af3_0    rapidsai
librttopo                 1.1.0                h1185371_6    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libspatialindex           1.9.3                h9c3ff4c_3    conda-forge
libspatialite             5.0.1                h20cb978_4    conda-forge
libssh2                   1.9.0                ha56f1ee_6    conda-forge
libstdcxx-ng              9.3.0               h6de172a_19    conda-forge
libthrift                 0.14.1               he6d91bd_1    conda-forge
libtiff                   4.2.0                hbd63e13_2    conda-forge
libutf8proc               2.6.1                h7f98852_0    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libuv                     1.41.0               h7f98852_0    conda-forge
libwebp                   1.2.0                h3452ae3_0    conda-forge
libwebp-base              1.2.0                h7f98852_2    conda-forge
libxcb                    1.13              h7f98852_1003    conda-forge
libxgboost                1.4.0dev.rapidsai0.19      cuda11.2_0    rapidsai
libxml2                   2.9.12               h72842e0_0    conda-forge
libzip                    1.7.3                h4de3113_0    conda-forge
llvmlite                  0.36.0           py38h4630a5e_0    conda-forge
locket                    0.2.0                      py_2    conda-forge
lz4-c                     1.9.3                h9c3ff4c_0    conda-forge
markdown                  3.3.4              pyhd8ed1ab_0    conda-forge
markupsafe                2.0.1            py38h497a2fe_0    conda-forge
matplotlib                3.4.2                    pypi_0    pypi
matplotlib-inline         0.1.2              pyhd8ed1ab_2    conda-forge
mistune                   0.8.4           py38h497a2fe_1003    conda-forge
msgpack-python            1.0.2            py38h1fd1430_1    conda-forge
multidict                 5.1.0            py38h497a2fe_1    conda-forge
multipledispatch          0.6.0                      py_0    conda-forge
munch                     2.5.0                      py_0    conda-forge
nbclient                  0.5.3              pyhd8ed1ab_0    conda-forge
nbconvert                 6.0.7            py38h578d9bd_3    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nccl                      2.9.9.1              hdc17891_0    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
netifaces                 0.10.9          py38h497a2fe_1003    conda-forge
networkx                  2.5.1              pyhd8ed1ab_0    conda-forge
nlohmann_json             3.9.1                h9c3ff4c_1    conda-forge
nodejs                    14.15.4              h92b4a50_1    conda-forge
notebook                  6.4.0              pyha770c72_0    conda-forge
numba                     0.53.1           py38h0e12cce_0    conda-forge
numpy                     1.20.3           py38h9894fe3_1    conda-forge
nvtx                      0.2.3            py38h497a2fe_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjdk                   11.0.9.1             h5cc2fde_1    conda-forge
openjpeg                  2.4.0                hb52868f_1    conda-forge
openssl                   1.1.1k               h7f98852_0    conda-forge
orc                       1.6.7                heec2584_1    conda-forge
packaging                 20.9               pyh44b312d_0    conda-forge
pandas                    1.2.4            py38h1abd341_0    conda-forge
pandoc                    2.14.0.1             h7f98852_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
panel                     0.10.3             pyhd8ed1ab_0    conda-forge
param                     1.10.1             pyhd3deb0d_0    conda-forge
parquet-cpp               1.5.1                         2    conda-forge
parso                     0.8.2              pyhd8ed1ab_0    conda-forge
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
pcre                      8.44                 he1b5a44_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.2.0            py38ha0e1e83_1    conda-forge
pip                       21.1.2             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h36c2ea0_0    conda-forge
poppler                   21.03.0              h93df280_0    conda-forge
poppler-data              0.4.10                        0    conda-forge
postgresql                13.3                 h2510834_0    conda-forge
proj                      8.0.0                h277dcde_0    conda-forge
prometheus_client         0.11.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.18             pyha770c72_0    conda-forge
protobuf                  3.15.8           py38h709712a_0    conda-forge
psutil                    5.8.0            py38h497a2fe_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py-xgboost                1.4.0dev.rapidsai0.19  cuda11.2py38_0    rapidsai
pyarrow                   1.0.1           py38hb53058b_37_cuda    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyct                      0.4.6                      py_0    conda-forge
pyct-core                 0.4.6                      py_0    conda-forge
pydeck                    0.5.0              pyh9f0ad1d_0    conda-forge
pyee                      7.0.4              pyh9f0ad1d_0    conda-forge
pygments                  2.9.0              pyhd8ed1ab_0    conda-forge
pyhive                    0.6.4              pyhd8ed1ab_0    conda-forge
pynvml                    11.0.0             pyhd8ed1ab_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyppeteer                 0.2.2                      py_1    conda-forge
pyproj                    3.0.1            py38hdf83a33_1    conda-forge
pyrsistent                0.17.3           py38h497a2fe_2    conda-forge
pysocks                   1.7.1            py38h578d9bd_3    conda-forge
python                    3.8.10          h49503c6_1_cpython    conda-forge
python-confluent-kafka    1.5.0            py38h1e0a361_0    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pyviz_comms               2.0.2              pyhd8ed1ab_0    conda-forge
pyyaml                    5.4.1            py38h497a2fe_0    conda-forge
pyzmq                     22.1.0           py38h2035c66_0    conda-forge
rapids                    0.19.0          cuda11.2_py38_ga03647d_299    rapidsai
rapids-blazing            0.19.0          cuda11.2_py38_ga03647d_299    rapidsai
rapids-xgboost            0.19.0          cuda11.2_py38_ga03647d_299    rapidsai
re2                       2021.04.01           h9c3ff4c_0    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
rmm                       0.19.0          cuda_11.2_py38_g7065af3_0    rapidsai
rtree                     0.9.7            py38h02d302b_1    conda-forge
s2n                       1.0.10               h9b69904_0    conda-forge
sasl                      0.3a1            py38h709712a_0    conda-forge
scikit-learn              0.24.2           py38hdc147b9_0    conda-forge
scipy                     1.6.3            py38h7b17777_0    conda-forge
send2trash                1.5.0                      py_0    conda-forge
setuptools                49.6.0           py38h578d9bd_3    conda-forge
shapely                   1.7.1            py38haeee4fe_5    conda-forge
simpervisor               0.4                pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                he1b5a44_3    conda-forge
sniffio                   1.2.0            py38h578d9bd_1    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
spdlog                    1.7.0                hc9558a2_2    conda-forge
sqlalchemy                1.4.18           py38h497a2fe_0    conda-forge
sqlite                    3.35.5               h74cdb3f_0    conda-forge
streamz                   0.6.2              pyh44b312d_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
terminado                 0.10.0           py38h578d9bd_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
threadpoolctl             2.1.0              pyh5ca1d4c_0    conda-forge
thrift                    0.13.0           py38h709712a_2    conda-forge
thrift_sasl               0.3.0           py38h1e0a361_1002    conda-forge
tiledb                    2.2.9                h91fcb0e_0    conda-forge
tk                        8.6.10               h21135ba_1    conda-forge
toolz                     0.11.1                     py_0    conda-forge
tornado                   6.1              py38h497a2fe_1    conda-forge
tqdm                      4.61.0             pyhd8ed1ab_0    conda-forge
traitlets                 5.0.5                      py_0    conda-forge
treelite                  1.1.0            py38hd08a91b_0    conda-forge
treelite-runtime          1.1.0                    pypi_0    pypi
typing-extensions         3.10.0.0             hd8ed1ab_0    conda-forge
typing_extensions         3.10.0.0           pyha770c72_0    conda-forge
tzcode                    2021a                h7f98852_1    conda-forge
tzdata                    2021a                he74cb21_0    conda-forge
ucx                       1.9.0+gcd9efd3       cuda11.2_0    rapidsai
ucx-proc                  1.0.0                       gpu    rapidsai
ucx-py                    0.19.0          py38_gcd9efd3_0    rapidsai
urllib3                   1.26.5             pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          0.57.0           py38h578d9bd_4    conda-forge
websockets                8.1              py38h497a2fe_3    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
widgetsnbextension        3.5.1            py38h578d9bd_4    conda-forge
xarray                    0.18.2             pyhd8ed1ab_0    conda-forge
xerces-c                  3.2.3                h9d8b166_2    conda-forge
xgboost                   1.4.0dev.rapidsai0.19  cuda11.2py38_0    rapidsai
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-inputproto           2.3.2             h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxi                1.7.10               h7f98852_0    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxtst              1.2.3             h7f98852_1002    conda-forge
xorg-recordproto          1.14.2            h7f98852_1002    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h516909a_0    conda-forge
yarl                      1.6.3            py38h497a2fe_1    conda-forge
zeromq                    4.3.4                h9c3ff4c_0    conda-forge
zict                      2.0.0                      py_0    conda-forge
zipp                      3.4.1              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
zstd                      1.4.9                ha95c52a_0    conda-forge

Additional context Add any other context about the problem here.

beckernick commented 3 years ago

I wonder if this might be an underlying difficulty in finding a non-degenerate solution given the matrix shape of (1345, 943).

As an example:

import cuml
import time
​
REPEATS = 5
​
for n in (100, 100000):
    for i in range(REPEATS):
        X, y = cuml.datasets.make_regression(n_samples=n, n_features=1000)
        model = cuml.linear_model.ElasticNet(alpha=1)
        tick = time.time()
        model.fit(X, y)
        tock = time.time()
        print(f"{n} x 1000 matrix,: {tock-tick} seconds to fit")
100 x 1000 matrix,: 1.3444466590881348 seconds to fit
100 x 1000 matrix,: 0.9838886260986328 seconds to fit
100 x 1000 matrix,: 1.3436815738677979 seconds to fit
100 x 1000 matrix,: 1.475243330001831 seconds to fit
100 x 1000 matrix,: 0.3737659454345703 seconds to fit
100000 x 1000 matrix,: 0.11346721649169922 seconds to fit
100000 x 1000 matrix,: 0.11413407325744629 seconds to fit
100000 x 1000 matrix,: 0.1149301528930664 seconds to fit
100000 x 1000 matrix,: 0.11407017707824707 seconds to fit
100000 x 1000 matrix,: 0.11468839645385742 seconds to fit
beckernick commented 3 years ago

When scikit-learn's ElasticNet cannot converge, it provides a warning: ConvergenceWarning: Objective did not converge. You might want to increase the number of iterations. Perhaps we might consider something similar?

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.