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

from lightautoml.automl.presets.tabular_presets import TabularAutoML, TabularUtilizedAutoML returns error #147

Open
4 tasks
numomcmc opened this issue Jan 9, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@numomcmc
Copy link

numomcmc commented Jan 9, 2024

🐛 Bug

To Reproduce

Steps to reproduce the behavior:

  1. In Kaggle notebook,
  2. Run !pip install -U LightAutoML
  3. Minor installation error msg.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
yellowbrick 1.3.post1 requires numpy<1.20,>=1.16.0, but you have numpy 1.21.6 which is incompatible.
tensorflow 2.4.1 requires numpy~=1.19.2, but you have numpy 1.21.6 which is incompatible.
pdpbox 0.2.1 requires matplotlib==3.1.1, but you have matplotlib 3.4.2 which is incompatible.
matrixprofile 1.1.10 requires protobuf==3.11.2, but you have protobuf 3.17.3 which is incompatible.
kornia 0.5.5 requires numpy<=1.19, but you have numpy 1.21.6 which is incompatible.
imbalanced-learn 0.8.0 requires scikit-learn>=0.24, but you have scikit-learn 0.23.2 which is incompatible.
Successfully installed CairoSVG-2.7.1 LightAutoML-0.3.7.3 Pyphen-0.14.0 StrEnum-0.4.15 alabaster-0.7.13 autowoe-1.3.2 cairocffi-1.6.1 catboost-1.2.2 cssselect2-0.7.0 dask-2022.2.0 distributed-2022.2.0 efficientnet-pytorch-0.7.1 featuretools-1.11.1 holidays-0.27.1 imagesize-1.4.1 importlib-metadata-1.7.0 json2html-1.3.0 numpy-1.21.6 opencv-python-4.5.2.52 pandas-1.3.5 poetry-core-1.6.1 snowballstemmer-2.2.0 sphinx-4.3.2 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 tinycss2-1.2.1 tqdm-4.66.1 weasyprint-52.5 woodwork-0.16.4
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv

  1. from lightautoml.automl.presets.tabular_presets import TabularAutoML, TabularUtilizedAutoML

TypeError Traceback (most recent call last)
in
11
12 # LightAutoML presets, task and report generation
---> 13 from lightautoml.automl.presets.tabular_presets import TabularAutoML, TabularUtilizedAutoML
14 from lightautoml.tasks import Task
15 from lightautoml.report.report_deco import ReportDeco

/opt/conda/lib/python3.7/site-packages/lightautoml/automl/presets/tabular_presets.py in
21 from tqdm import tqdm
22
---> 23 from ...addons.utilization import TimeUtilization
24 from ...dataset.np_pd_dataset import NumpyDataset
25 from ...ml_algo.boost_cb import BoostCB

/opt/conda/lib/python3.7/site-packages/lightautoml/addons/utilization/init.py in
1 """Tools to configure resources utilization."""
----> 2 from .utilization import TimeUtilization
3
4
5 all = ["TimeUtilization"]

/opt/conda/lib/python3.7/site-packages/lightautoml/addons/utilization/utilization.py in
11 from typing import Union
12
---> 13 from ...automl.base import AutoML
14 from ...automl.blend import BestModelSelector
15 from ...automl.blend import Blender

/opt/conda/lib/python3.7/site-packages/lightautoml/automl/base.py in
10 from typing import Sequence
11
---> 12 from ..dataset.base import LAMLDataset
13 from ..dataset.utils import concatenate
14 from ..pipelines.ml.base import MLPipeline

/opt/conda/lib/python3.7/site-packages/lightautoml/dataset/base.py in
10 from typing import Union
11
---> 12 from ..tasks.base import Task
13 from .roles import ColumnRole
14

/opt/conda/lib/python3.7/site-packages/lightautoml/tasks/init.py in
1 """Define the task to solve its loss, metric."""
2
----> 3 from .base import Task
4
5

/opt/conda/lib/python3.7/site-packages/lightautoml/tasks/base.py in
16 from .common_metric import _valid_metric_args
17 from .common_metric import _valid_str_metric_names
---> 18 from .losses import CBLoss
19 from .losses import LGBLoss
20 from .losses import SKLoss

/opt/conda/lib/python3.7/site-packages/lightautoml/tasks/losses/init.py in
3 from .base import _valid_str_metric_names
4 from .cb import CBLoss
----> 5 from .lgb import LGBLoss
6 from .sklearn import SKLoss
7 from .torch import TORCHLoss

/opt/conda/lib/python3.7/site-packages/lightautoml/tasks/losses/lgb.py in
10 from typing import Union
11
---> 12 import lightgbm as lgb
13 import numpy as np
14

/opt/conda/lib/python3.7/site-packages/lightgbm/init.py in
6 import os
7
----> 8 from .basic import Booster, Dataset, register_logger
9 from .callback import early_stopping, print_evaluation, record_evaluation, reset_parameter
10 from .engine import CVBooster, cv, train

/opt/conda/lib/python3.7/site-packages/lightgbm/basic.py in
15 import scipy.sparse
16
---> 17 from .compat import PANDAS_INSTALLED, concat, dt_DataTable, is_dtype_sparse, pd_DataFrame, pd_Series
18 from .libpath import find_lib_path
19

/opt/conda/lib/python3.7/site-packages/lightgbm/compat.py in
113 from dask import delayed
114 from dask.array import Array as dask_Array
--> 115 from dask.dataframe import DataFrame as dask_DataFrame
116 from dask.dataframe import Series as dask_Series
117 from dask.distributed import Client, default_client, wait

/opt/conda/lib/python3.7/site-packages/dask/dataframe/init.py in
1 try:
2 from ..base import compute
----> 3 from . import backends, dispatch, rolling
4 from .core import (
5 DataFrame,

/opt/conda/lib/python3.7/site-packages/dask/dataframe/backends.py in
21
22 from ..utils import is_arraylike, typename
---> 23 from .core import DataFrame, Index, Scalar, Series, _Frame
24 from .dispatch import (
25 categorical_dtype_dispatch,

/opt/conda/lib/python3.7/site-packages/dask/dataframe/core.py in
79 no_default = "no_default"
80
---> 81 pd.set_option("compute.use_numexpr", False)
82
83

/opt/conda/lib/python3.7/site-packages/pandas/_config/config.py in call(self, *args, **kwds)
231 # class below which wraps functions inside a callable, and converts
232 # doc into a property function. The doctsrings below are templates
--> 233 # using the py2.6+ advanced formatting syntax to plug in a concise list
234 # of options, and option descriptions.
235

/opt/conda/lib/python3.7/site-packages/pandas/_config/config.py in _set_option(*args, **kwargs)
139 if o and o.validator:
140 o.validator(v)
--> 141
142 # walk the nested dict
143 root, k = _get_root(key)

/opt/conda/lib/python3.7/site-packages/pandas/core/config_init.py in use_numexpr_cb(key)
48
49
---> 50 def use_numexpr_cb(key):
51 from pandas.core.computation import expressions
52

/opt/conda/lib/python3.7/site-packages/pandas/core/computation/expressions.py in
17 from pandas._typing import FuncType
18
---> 19 from pandas.core.computation.check import NUMEXPR_INSTALLED
20 from pandas.core.ops import roperator
21

/opt/conda/lib/python3.7/site-packages/pandas/core/computation/check.py in
1 from pandas.compat._optional import import_optional_dependency
2
----> 3 ne = import_optional_dependency("numexpr", errors="warn")
4 NUMEXPR_INSTALLED = ne is not None
5 if NUMEXPR_INSTALLED:

TypeError: import_optional_dependency() got an unexpected keyword argument 'errors'

You can duplicate this behavior by running the notebook here

Expected behavior

Installation with compatibility via pip is not unusual. Maybe introduce a conda installation procedure?

from lightautoml.automl.presets.tabular_presets import TabularAutoML, TabularUtilizedAutoML

shouldn't return errors...

Additional context

Checklist

  • bug description
  • steps to reproduce
  • expected behavior
  • code sample / screenshots
@numomcmc numomcmc added the bug Something isn't working label Jan 9, 2024
@BELONOVSKII
Copy link
Collaborator

BELONOVSKII commented Jan 10, 2024

Hello @numomcmc! The problem is that pip installs an old version of LightAutoML (<0.3.0). By default, kaggle uses python3.10 and the latest stable versions of LightAutoML are not seen for pip3.10. We are working on this.

A temporary solution is to install LightAutoML from the lightautoml-0.3.8-py3-none-any.whl file provided by @alexmryzhkov. See the notebook for an example.

@numomcmc
Copy link
Author

numomcmc commented Jan 10, 2024 via email

@BELONOVSKII
Copy link
Collaborator

BELONOVSKII commented Jan 10, 2024

Stefan, hello once again! I can not figure out why url is not working, so I will provide the code snippet here.

  • Firstly download the lightautoml-0.3.8-py3-none-any.whl file from here.

  • Then run pip install lightautoml-0.3.8-py3-none-any.whl inside your environment.

@BELONOVSKII
Copy link
Collaborator

Update

Now, you can install LightAutoML on python3.10 by directly specifying the version0.3.8.b1,
i.e pip install -U lightautoml==0.3.8b1

@numomcmc
Copy link
Author

numomcmc commented Jan 12, 2024 via email

@BELONOVSKII
Copy link
Collaborator

BELONOVSKII commented Jan 12, 2024

Hello, Stephen. LightGBM and Catboost automatically switch to GPU, if available.

Moreover, there is an explicit GPU implementation of LightAutoML.
Check LightAutoML_GPU.

@numomcmc
Copy link
Author

numomcmc commented Jan 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants