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]: ImportError: cannot import name 'get_columns_to_stratify_by' #3939

Open
3 tasks done
aucouer opened this issue Mar 11, 2024 · 0 comments
Open
3 tasks done

[BUG]: ImportError: cannot import name 'get_columns_to_stratify_by' #3939

aucouer opened this issue Mar 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@aucouer
Copy link

aucouer commented Mar 11, 2024

pycaret version checks

Issue Description

I tried to use pycaret.time_series with python version==3.6,but it told me that "ImportError: cannot import name 'get_columns_to_stratify_by'";

Reproducible Example

from pycaret.time_series import *
s = setup(data, fh = 3, session_id = 123)

Expected Behavior

Description Value
0 session_id 123
1 Target Number of airline passengers
2 Approach Univariate
3 Exogenous Variables Not Present
4 Original data shape (144, 1)
5 Transformed data shape (144, 1)
6 Transformed train set shape (141, 1)
7 Transformed test set shape (3, 1)
8 Rows with missing values 0.0%
9 Fold Generator ExpandingWindowSplitter
10 Fold Number 3
11 Enforce Prediction Interval False
12 Splits used for hyperparameters all
13 Seasonality Detection Algo auto
14 Max Period to Consider 60
15 Seasonal Period(s) Tested [12, 24, 36, 11, 48]
16 Significant Seasonal Period(s) [12, 24, 36, 11, 48]
17 Significant Seasonal Period(s) without Harmonics [48, 36, 11]
18 Remove Harmonics False
19 Harmonics Order Method harmonic_max
20 Num Seasonalities to Use 1
21 All Seasonalities to Use [12]
22 Primary Seasonality 12
23 Seasonality Present True
24 Target Strictly Positive True
25 Target White Noise No
26 Recommended d 1
27 Recommended Seasonal D 1
28 Preprocess False
29 CPU Jobs -1
30 Use GPU False
31 Log Experiment False
32 Experiment Name ts-default-name
33 USI 4a01

Actual Results

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-06c3a214b9d6> in <module>
      5 from tqdm import tqdm
      6 data = pd.read_csv('./Iraq_bandwidth_isp_province_domain.csv')
----> 7 from pycaret.time_series import *
      8 s = setup(data, fh = 3, session_id = 123)

/usr/local/lib/python3.6/site-packages/pycaret/time_series.py in <module>
     11 import pandas as pd  # type: ignore
     12 
---> 13 from pycaret.internal.pycaret_experiment import TimeSeriesExperiment
     14 from pycaret.internal.utils import check_if_global_is_not_none
     15 

/usr/local/lib/python3.6/site-packages/pycaret/internal/pycaret_experiment/__init__.py in <module>
      2 from .clustering_experiment import ClusteringExperiment
      3 
----> 4 from .classification_experiment import ClassificationExperiment
      5 from .regression_experiment import RegressionExperiment
      6 from .time_series_experiment import TimeSeriesExperiment

/usr/local/lib/python3.6/site-packages/pycaret/internal/pycaret_experiment/classification_experiment.py in <module>
      1 from pycaret.internal.pycaret_experiment.utils import highlight_setup, MLUsecase
----> 2 from pycaret.internal.pycaret_experiment.supervised_experiment import (
      3     _SupervisedExperiment,
      4 )
      5 from pycaret.internal.utils import color_df

/usr/local/lib/python3.6/site-packages/pycaret/internal/pycaret_experiment/supervised_experiment.py in <module>
     12     get_pipeline_fit_kwargs,
     13 )
---> 14 from pycaret.internal.utils import (
     15     color_df,
     16     nullcontext,

ImportError: cannot import name 'get_columns_to_stratify_by'

Installed Versions

'2.3.4'
@aucouer aucouer added the bug Something isn't working label Mar 11, 2024
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

1 participant