当在databricks中导入 getting时间序列(Beta)模块时,我得到了下面的错误(我们之前运行得很成功)。请你帮忙解决这些问题。
使用中的version版本:
import pycaret
pycaret.__version__ # Out[1]: '3.0.0'
正在使用的python版本:
import sys
sys.version #Out[9]: '3.8.10 (default, Mar 15 2022, 12:22:08) \n[GCC 9.4.0]'
下面是该问题的堆栈跟踪。
from pycaret.time_series import TSForecastingExperiment
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
160 # Import the desired module. If you’re seeing this while debugging a failed import,
161 # look at preceding stack frames for relevant error information.
--> 162 original_result = python_builtin_import(name, globals, locals, fromlist, level)
163
164 is_root_import = thread_local._nest_level == 1
/databricks/python/lib/python3.8/site-packages/pycaret/time_series/__init__.py in <module>
----> 1 from pycaret.time_series.forecasting.oop import TSForecastingExperiment
2 from pycaret.time_series.forecasting.functional import (
3 setup,
4 create_model,
5 compare_models,
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
160 # Import the desired module. If you’re seeing this while debugging a failed import,
161 # look at preceding stack frames for relevant error information.
--> 162 original_result = python_builtin_import(name, globals, locals, fromlist, level)
163
164 is_root_import = thread_local._nest_level == 1
/databricks/python/lib/python3.8/site-packages/pycaret/time_series/forecasting/oop.py in <module>
14 from sklearn.base import clone
15 from sktime.forecasting.base import ForecastingHorizon
---> 16 from sktime.forecasting.model_selection import (
17 temporal_train_test_split,
18 ExpandingWindowSplitter,
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
160 # Import the desired module. If you’re seeing this while debugging a failed import,
161 # look at preceding stack frames for relevant error information.
--> 162 original_result = python_builtin_import(name, globals, locals, fromlist, level)
163
164 is_root_import = thread_local._nest_level == 1
/databricks/python/lib/python3.8/site-packages/sktime/forecasting/model_selection/__init__.py in <module>
20 from sktime.forecasting.model_selection._split import SlidingWindowSplitter
21 from sktime.forecasting.model_selection._split import temporal_train_test_split
---> 22 from sktime.forecasting.model_selection._tune import ForecastingGridSearchCV
23 from sktime.forecasting.model_selection._tune import ForecastingRandomizedSearchCV
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
160 # Import the desired module. If you’re seeing this while debugging a failed import,
161 # look at preceding stack frames for relevant error information.
--> 162 original_result = python_builtin_import(name, globals, locals, fromlist, level)
163
164 is_root_import = thread_local._nest_level == 1
/databricks/python/lib/python3.8/site-packages/sktime/forecasting/model_selection/_tune.py in <module>
11 from sklearn.base import clone
12 from sklearn.model_selection import ParameterGrid, ParameterSampler, check_cv
---> 13 from sklearn.model_selection._search import _check_param_grid
14 from sklearn.utils.metaestimators import if_delegate_has_method
发布于 2022-05-13 11:20:56
这是由于在sktime依赖项中使用了sklearn的私有方法。自从sklearn更新到1.1.0之后,这个私有方法就被删除/移动了,因此它正在崩溃。sktime团队正在致力于解决这个问题。同时,您可以通过强制安装sklearn 1.0.2来修复这个问题。
请参阅GitHub Repo:https://github.com/pycaret/pycaret/issues/2542中的详细信息
https://stackoverflow.com/questions/72228607
复制相似问题