darts icon indicating copy to clipboard operation
darts copied to clipboard

[BUG] Memory Issue while importing models from darts

Open aChatterjee13 opened this issue 1 year ago • 1 comments

Using darts v 0.23.1 Ananconda Python 3.8.x AMD 64

After I install the package and try to import any model I get the below error. Tried to replicate on a different computer and this did not occur. Any reason for this error and possible ways to fix the below?

Logs:

from darts.models import FFT Traceback (most recent call last): File "", line 1, in File "C:\Users\anindya.conda envs\forecasting-prod\lib\site-packages\darts\models\init_.py", line 45, in from darts.models.forecasting.lgbm import LightGBMModel File "C:\Users\anindya.conda\envs\forecasting-prod\lib\site-packages\darts\models\forecasting\lgbm.py", line 15, in import lightgbm as 1gb File "C:\Users\anindya.conda\envs\forecasting-prod\lib\site-packages\lightgbm_init__.py", line 8, in from basic import Booster, Dataset, Sequence, register_logger File "C:\Users\anindya.conda\envs\forecasting-prod\lib\site-packages\lightgbm\basic.py", line 247, in LIB = _load_lib() File "C: ars\anindya.conda\envs\forecasting-prod\lib\site-packages\lightgbm\basic.py", line 232, in _load_lib lib ctypes.cd11.LoadLibrary(lib_path[e]) File "C:\Users\anindya.conda\envs\forecasting-prod\lib\ctypes_i.py", line 447, in LoadLibrary File "C:\Users\anindya.conda\envs\forecasting-prod\lib\ctypes\init.py", line 369, in_init return self. diltype(name) self. handle = _dlopen(self._name, mode) OSError: [WinError 8] Not enough memory resources are available to process this command

aChatterjee13 avatar Feb 13 '24 13:02 aChatterjee13

Hi @aChatterjee13,

It seems like the problem is coming from the lightgbm library. Please check if it's properly installed, or if this error is documented on their side.

If you don't need or use this model, you can uninstall it and Darts should still work fine as it's an optional dependency.

madtoinou avatar Feb 16 '24 08:02 madtoinou

This was fixed by #2304, it was caused by the order of the imports.

madtoinou avatar Apr 17 '24 07:04 madtoinou