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]: Training fails in the compare model #3930

Open
3 tasks done
cilvo3i opened this issue Feb 29, 2024 · 1 comment
Open
3 tasks done

[BUG]: Training fails in the compare model #3930

cilvo3i opened this issue Feb 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cilvo3i
Copy link

cilvo3i commented Feb 29, 2024

pycaret version checks

Issue Description

error is rasied in log for all the models

Reproducible Example

from pycaret.regression import RegressionExperiment
exp = RegressionExperiment()
data = exp.setup(data = kpi_data, target = 'Financial_Impact_Due_to_Attacks', session_id = 123,
          feature_selection = True, feature_selection_method = 'sequential', 
          feature_selection_estimator = 'lasso', normalize = False, transformation = False, n_jobs = 1)

exp.compare_models()

Expected Behavior

log file:

File "/home/cilvo-simon/.local/lib/python3.10/site-packages/pycaret/internal/pycaret_experiment/supervised_experiment.py", line 796, in compare_models
model, model_fit_time = self._create_model(**create_model_args)
File "/home/cilvo-simon/.local/lib/python3.10/site-packages/pycaret/internal/pycaret_experiment/supervised_experiment.py", line 1527, in _create_model
model, model_fit_time, model_results, _ = self._create_model_with_cv(
File "/home/cilvo-simon/.local/lib/python3.10/site-packages/pycaret/internal/pycaret_experiment/supervised_experiment.py", line 1121, in _create_model_with_cv
scores = cross_validate(
File "/home/cilvo-simon/.local/lib/python3.10/site-packages/sklearn/model_selection/_validation.py", line 285, in cross_validate
_warn_or_raise_about_fit_failures(results, error_score)
File "/home/cilvo-simon/.local/lib/python3.10/site-packages/sklearn/model_selection/_validation.py", line 367, in _warn_or_raise_about_fit_failures
raise ValueError(all_fits_failed_message)
ValueError:
All the 10 fits failed.
It is very likely that your model is misconfigured.
You can try to debug the error by setting error_score='raise'.

>>> from sklearn.model_selection import cross_val_score

File "/home/cilvo-simon/.local/lib/python3.10/site-packages/pycaret/internal/patches/sklearn.py", line 135, in wrapper
if len(args[0]) > 1: # Has transformers
TypeError: object of type 'Lasso' has no len()

Actual Results

top models

Installed Versions

latest

@cilvo3i cilvo3i added the bug Something isn't working label Feb 29, 2024
@etherealz9
Copy link

I'm experiencing the same issue and some configurations prompt AttributeError: 'AdaBoostRegressor' object has no attribute '_memory_full_transform'.

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

2 participants