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

[BUG]: Current pycaret-ts-alpha package installs incompatible version of scikit-learn #2542

Closed
2 of 3 tasks
rantos9 opened this issue May 12, 2022 · 6 comments
Closed
2 of 3 tasks
Assignees
Labels
bug Something isn't working installation time_series Topics related to the time series

Comments

@rantos9
Copy link

rantos9 commented May 12, 2022

pycaret version checks

Issue Description

scikit-learn just updated its package to version 1.1.0 and pycaret dosen't seem to be currently compatible with it but pypi package dosen't seem to enforce a version lower than this.

Reproducible Example

from pycaret.time_series import TSForecastingExperiment

Expected Behavior

Importing with no problems

Actual Results

---------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)
Input In [1], in <cell line: 7>()
      5 import numpy as np
      6 import pandas as pd
----> 7 from pycaret.time_series import TSForecastingExperiment
      9 import plotly.express as px
     10 import plotly.graph_objects as go
 
File ~/anaconda3/envs/pycaret-ts/lib/python3.8/site-packages/pycaret/time_series/__init__.py:1, in <module>
----> 1 from pycaret.time_series.forecasting.oop import TSForecastingExperiment
      2 from pycaret.time_series.forecasting.functional import (
      3     setup,
      4     create_model,
   (...)
     25     check_stats,
     26 )
     28 __all__ = [
     29     "TSForecastingExperiment",
     30     "setup",
   (...)
     52     "check_stats",
     53 ]
 
File ~/anaconda3/envs/pycaret-ts/lib/python3.8/site-packages/pycaret/time_series/forecasting/oop.py:16, 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,
     19     SlidingWindowSplitter,
     20 )
     22 from sktime.forecasting.base import BaseForecaster
     24 # from sktime.forecasting.compose import ForecastingPipeline

File ~/anaconda3/envs/pycaret-ts/lib/python3.8/site-packages/sktime/forecasting/model_selection/__init__.py:22, 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

File ~/anaconda3/envs/pycaret-ts/lib/python3.8/site-packages/sktime/forecasting/model_selection/_tune.py:13, 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
     16 from sktime.exceptions import NotFittedError

ImportError: cannot import name '_check_param_grid' from 'sklearn.model_selection._search' (/home/ec2-user/anaconda3/envs/pycaret-ts/lib/python3.8/site-packages/sklearn/model_selection/_search.py)

Installed Versions

System:
python: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0]
executable: /home/ec2-user/anaconda3/envs/pycaret-ts/bin/python
machine: Linux-4.14.252-131.483.amzn1.x86_64-x86_64-with-glibc2.10

Python dependencies:
pip: 22.1
setuptools: 60.10.0
pycaret: 3.0.0
sklearn: 1.1.0
sktime: 0.10.1
statsmodels: 0.13.2
numpy: 1.21.6
scipy: 1.7.3
pandas: 1.4.2
matplotlib: 3.5.2
plotly: 5.8.0
joblib: 1.0.1
numba: 0.55.1
mlflow: 1.25.1
lightgbm: 3.3.2
xgboost: 1.6.1
pmdarima: 1.8.5
tbats: Installed but version unavailable
prophet: Not installed
tsfresh: Not installed

@rantos9 rantos9 added the bug Something isn't working label May 12, 2022
@ngupta23
Copy link
Collaborator

Thank you for reporting this. This is due to a private method call in one of pycaret's dependencies (sktime): sktime/sktime#2631. Once they fix this, pycaret should be fixed automatically.

For now, can you try limiting sklearn version to < 1.1.0 manually?

@ngupta23 ngupta23 added installation time_series Topics related to the time series labels May 12, 2022
@ngupta23 ngupta23 added this to the pycaret 3.0.0rc1 milestone May 12, 2022
@ngupta23 ngupta23 self-assigned this May 12, 2022
@ngupta23
Copy link
Collaborator

ngupta23 commented May 12, 2022

@Yard1 Since the 3.0.0rc release is still 2-3 weeks out, can we make an updated release for pycaret-ts-alpha from develop but with sklearn pinned to < 1.1.0? This would be a good pretest for 3.0.0rc1 :)

@ngupta23 ngupta23 assigned Yard1 and unassigned ngupta23 May 12, 2022
@Yard1
Copy link
Member

Yard1 commented May 12, 2022

Sure thing, will do that tomorrow!

@moezali1
Copy link
Collaborator

@ngupta23 Is this issue fixed? Should we close it?

@brunobarella
Copy link

brunobarella commented May 26, 2022

still with problem! rsrs
@Yard1 my error happened while installing the package.
Do you have any suggestions to fix it momentarily?

@ngupta23
Copy link
Collaborator

@brunobarella I do not see any issues anymore. It is working on Google colab. See https://gist.github.com/ngupta23/1dedff5bd94017f5e931614fcdb60187

I will close this now. If the issue persists, please open another issue with all the details to reproduce the error.

Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working installation time_series Topics related to the time series
Projects
None yet
Development

No branches or pull requests

5 participants