소개
게시글
질문&답변
2024.05.08
5.6 실습코드 오류질문
(사진)이렇게 나옵니다!
- 0
- 3
- 547
질문&답변
2024.01.19
lightgbm 오류
TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import lightgbm 2 print(lightgbm.__version__) File ~\anaconda3\lib\site-packages\lightgbm\__init__.py:8 2 """LightGBM, Light Gradient Boosting Machine. 3 4 Contributors: https://github.com/microsoft/LightGBM/graphs/contributors. 5 """ 6 from pathlib import Path ----> 8 from .basic import Booster, Dataset, Sequence, register_logger 9 from .callback import early_stopping, log_evaluation, record_evaluation, reset_parameter 10 from .engine import CVBooster, cv, train File ~\anaconda3\lib\site-packages\lightgbm\basic.py:21 18 import numpy as np 19 import scipy.sparse ---> 21 from .compat import PANDAS_INSTALLED, concat, dt_DataTable, pd_CategoricalDtype, pd_DataFrame, pd_Series 22 from .libpath import find_lib_path 24 if TYPE_CHECKING: File ~\anaconda3\lib\site-packages\lightgbm\compat.py:147 145 from dask.dataframe import DataFrame as dask_DataFrame 146 from dask.dataframe import Series as dask_Series --> 147 from dask.distributed import Client, Future, default_client, wait 148 DASK_INSTALLED = True 149 except ImportError: File ~\anaconda3\lib\site-packages\dask\distributed.py:13 5 _import_error_message = ( 6 "dask.distributed is not installed.\n\n" 7 "Please either conda or pip install distributed:\n\n" 8 " conda install dask distributed # either conda install\n" 9 ' python -m pip install "dask[distributed]" --upgrade # or pip install' 10 ) 12 try: ---> 13 from distributed import * 14 except ImportError as e: 15 if e.msg == "No module named 'distributed'": File ~\anaconda3\lib\site-packages\distributed\__init__.py:23 20 from dask.config import config # type: ignore 22 from distributed._version import get_versions ---> 23 from distributed.actor import Actor, ActorFuture, BaseActorFuture 24 from distributed.client import ( 25 Client, 26 CompatibleExecutor, (...) 35 wait, 36 ) 37 from distributed.core import Status, connect, rpc File ~\anaconda3\lib\site-packages\distributed\actor.py:13 9 from typing import Generic, Literal, NoReturn, TypeVar 11 from tornado.ioloop import IOLoop ---> 13 from distributed.client import Future 14 from distributed.protocol import to_serialize 15 from distributed.utils import LateLoopEvent, iscoroutinefunction, sync, thread_state File ~\anaconda3\lib\site-packages\distributed\client.py:117 94 from distributed.utils import ( 95 CancelledError, 96 LoopRunner, (...) 107 thread_state, 108 ) 109 from distributed.utils_comm import ( 110 WrappedKey, 111 gather_from_workers, (...) 115 unpack_remotedata, 116 ) --> 117 from distributed.worker import get_client, get_worker, secede 119 logger = logging.getLogger(__name__) 121 _global_clients: weakref.WeakValueDictionary[ 122 int, Client 123 ] = weakref.WeakValueDictionary() File ~\anaconda3\lib\site-packages\distributed\worker.py:120 118 from distributed.utils_perf import disable_gc_diagnosis, enable_gc_diagnosis 119 from distributed.versions import get_versions --> 120 from distributed.worker_memory import ( 121 DeprecatedMemoryManagerAttribute, 122 DeprecatedMemoryMonitor, 123 WorkerDataParameter, 124 WorkerMemoryManager, 125 ) 126 from distributed.worker_state_machine import ( 127 AcquireReplicasEvent, 128 BaseWorker, (...) 152 WorkerState, 153 ) 155 if TYPE_CHECKING: 156 # FIXME import from typing (needs Python >=3.10) File ~\anaconda3\lib\site-packages\distributed\worker_memory.py:56 53 from distributed.nanny import Nanny 54 from distributed.worker import Worker ---> 56 WorkerDataParameter: TypeAlias = Union[ 57 # pre-initialized 58 MutableMapping[Key, object], 59 # constructor 60 Callable[[], MutableMapping[Key, object]], 61 # constructor, passed worker.local_directory 62 Callable[[str], MutableMapping[Key, object]], 63 # (constructor, kwargs to constructor) 64 tuple[Callable[..., MutableMapping[Key, object]], dict[str, Any]], 65 # initialize internally 66 None, 67 ] 69 worker_logger = logging.getLogger("distributed.worker.memory") 70 worker_logger.addFilter(RateLimiterFilter(r"Unmanaged memory use is high")) File ~\anaconda3\lib\typing.py:243, in _tp_cache..inner(*args, **kwds) 241 except TypeError: 242 pass # All real errors (not unhashable args) are raised below. --> 243 return func(*args, **kwds) File ~\anaconda3\lib\typing.py:316, in _SpecialForm.__getitem__(self, parameters) 314 @_tp_cache 315 def __getitem__(self, parameters): --> 316 return self._getitem(self, parameters) File ~\anaconda3\lib\typing.py:421, in Union(self, parameters) 419 msg = "Union[arg, ...]: each arg must be a type." 420 parameters = tuple(_type_check(p, msg) for p in parameters) --> 421 parameters = _remove_dups_flatten(parameters) 422 if len(parameters) == 1: 423 return parameters[0] File ~\anaconda3\lib\typing.py:215, in _remove_dups_flatten(parameters) 213 params.append(p) 214 # Weed out strict duplicates, preserving the first of each occurrence. --> 215 all_params = set(params) 216 if len(all_params) 넵! 이렇게 에러가 떴네용
- 0
- 2
- 336