mljar-supervised icon indicating copy to clipboard operation
mljar-supervised copied to clipboard

ERROR No models produced

Open prashant-iiitd opened this issue 3 years ago • 5 comments

Linear algorithm was disabled.
AutoML directory: AutoML_1
The task is regression with evaluation metric r2
AutoML will use algorithms: ['Random Forest', 'LightGBM', 'Xgboost', 'CatBoost', 'Neural Network']
AutoML will ensemble available models
AutoML steps: ['simple_algorithms', 'default_algorithms', 'not_so_random', 'golden_features', 'insert_random_feature', 'features_selection', 'hill_climbing_1', 'hill_climbing_2', 'ensemble']
Skip simple_algorithms because no parameters were generated.
* Step default_algorithms will try to check up to 5 models
2022-10-22 20:06:55,545 supervised.exceptions ERROR No models produced. 
Please check your data or submit a Github issue at https://github.com/mljar/mljar-supervised/issues/new.
1_Default_LightGBM not trained. Stop training after the first fold. Time needed to train on the first fold 5732.0 seconds. The time estimate for training on all folds is larger than total_time_limit.
There was an error during 2_Default_Xgboost training.
Please check AutoML_1/errors.md for details.
There was an error during 3_Default_CatBoost training.
Please check AutoML_1/errors.md for details.
There was an error during 4_Default_NeuralNetwork training.
Please check AutoML_1/errors.md for details.
There was an error during 5_Default_RandomForest training.
Please check AutoML_1/errors.md for details.
Skip not_so_random because of the time limit.
Skip golden_features because no parameters were generated.
Skip insert_random_feature because no parameters were generated.
Skip features_selection because no parameters were generated.
---------------------------------------------------------------------------
AutoMLException                           Traceback (most recent call last)
/tmp/ipykernel_2105553/3939200943.py in <module>
----> 1 mljar_perf.fit(X_train, y_train)

~/.local/lib/python3.9/site-packages/supervised/automl.py in fit(self, X, y, sample_weight, cv)
    366             AutoML object: Returns `self`
    367         """
--> 368         return self._fit(X, y, sample_weight, cv)
    369 
    370     def predict(self, X: Union[List, numpy.ndarray, pandas.DataFrame]) -> numpy.ndarray:

~/.local/lib/python3.9/site-packages/supervised/base_automl.py in _fit(self, X, y, sample_weight, cv)
   1124 
   1125         except Exception as e:
-> 1126             raise e
   1127 
   1128         return self

~/.local/lib/python3.9/site-packages/supervised/base_automl.py in _fit(self, X, y, sample_weight, cv)
   1041                 if "hill_climbing" in step or step in ["ensemble", "stack"]:
   1042                     if len(self._models) == 0:
-> 1043                         raise AutoMLException(
   1044                             "No models produced. \nPlease check your data or"
   1045                             " submit a Github issue at [https://github.com/mljar/mljar-supervised/issues/new."](https://github.com/mljar/mljar-supervised/issues/new.%22)

AutoMLException: No models produced. 
Please check your data or submit a Github issue at https://github.com/mljar/mljar-supervised/issues/new.

prashant-iiitd avatar Oct 22 '22 20:10 prashant-iiitd

@prashant-iiitd thank you for reporting the issue! Sorry for the problems.

Can you share code+data to reproduce the issue? What parameters have you used?

pplonski avatar Oct 24 '22 10:10 pplonski

import pandas as pd; from supervised.automl import AutoML

train = pd.read_csv('data.csv')

X_train = train.copy(); y_train = X_train.pop('target');

mljar_perf = AutoML(ml_task='regression', mode='Perform', eval_metric= 'r2', explain_level=2 )

The following block gives an error. Error has been specified above. Also, when I try it with optuna, it still gives an error.

mljar_perf.fit(X_train, y_train)

Link to the data: https://drive.google.com/file/d/19yjH1RCVCPpWIpyDINlb1UvUlE02lggC/view?usp=sharing Please, send google drive access request to access the data.

Thanks

prashant-iiitd avatar Oct 25 '22 20:10 prashant-iiitd

Hello there, @pplonski @prashant-iiitd Same issue here.

SAMPLE DATA X.csv y.csv

SAMPLE CODE from supervised import AutoML ModelPath = "C:/PROJET/dynamic-vincent/model/" automl = AutoML( results_path = ModelPath, mode="Perform", ml_task ="regression", eval_metric= "spearman", boost_on_errors =True, total_time_limit = 120 ) automl.fit(X_train, y_train) preds = automl.predict(X_test)

OUTPUT Linear algorithm was disabled. AutoML directory: AutoML_8 The task is regression with evaluation metric rmse AutoML will use algorithms: ['Random Forest', 'LightGBM', 'Xgboost', 'CatBoost', 'Neural Network'] AutoML will ensemble available models AutoML steps: ['simple_algorithms', 'default_algorithms', 'not_so_random', 'golden_features', 'insert_random_feature', 'features_selection', 'hill_climbing_1', 'hill_climbing_2', 'ensemble'] Skip simple_algorithms because no parameters were generated.

  • Step default_algorithms will try to check up to 5 models 1_Default_LightGBM not trained. Stop training after the first fold. Time needed to train on the first fold 35.0 seconds. The time estimate for training on all folds is larger than total_time_limit. There was an error during 2_Default_Xgboost training. Please check AutoML_8\errors.md for details. There was an error during 3_Default_CatBoost training. Please check AutoML_8\errors.md for details. There was an error during 4_Default_NeuralNetwork training. Please check AutoML_8\errors.md for details. There was an error during 5_Default_RandomForest training. Please check AutoML_8\errors.md for details.
  • Step not_so_random will try to check up to 20 models 2023-06-10 16:58:45,156 supervised.exceptions ERROR No models produced. Please check your data or submit a Github issue at https://github.com/mljar/mljar-supervised/issues/new. 5_LightGBM not trained. Stop training after the first fold. Time needed to train on the first fold 36.0 seconds. The time estimate for training on all folds is larger than total_time_limit. There was an error during 1_Xgboost training. Please check AutoML_8\errors.md for details. There was an error during 9_CatBoost training. Please check AutoML_8\errors.md for details. There was an error during 13_RandomForest training. Please check AutoML_8\errors.md for details. There was an error during 17_NeuralNetwork training. Please check AutoML_8\errors.md for details. There was an error during 6_LightGBM training. Please check AutoML_8\errors.md for details. There was an error during 2_Xgboost training. Please check AutoML_8\errors.md for details. There was an error during 10_CatBoost training. Please check AutoML_8\errors.md for details. There was an error during 14_RandomForest training. Please check AutoML_8\errors.md for details. There was an error during 18_NeuralNetwork training. Please check AutoML_8\errors.md for details. There was an error during 7_LightGBM training. Please check AutoML_8\errors.md for details. There was an error during 3_Xgboost training. Please check AutoML_8\errors.md for details. There was an error during 11_CatBoost training. Please check AutoML_8\errors.md for details. There was an error during 15_RandomForest training. Please check AutoML_8\errors.md for details. There was an error during 19_NeuralNetwork training. Please check AutoML_8\errors.md for details. There was an error during 8_LightGBM training. Please check AutoML_8\errors.md for details. There was an error during 4_Xgboost training. Please check AutoML_8\errors.md for details. There was an error during 12_CatBoost training. Please check AutoML_8\errors.md for details. There was an error during 16_RandomForest training. Please check AutoML_8\errors.md for details. There was an error during 20_NeuralNetwork training. Please check AutoML_8\errors.md for details. Skip golden_features because no parameters were generated. Skip insert_random_feature because no parameters were generated. Skip features_selection because no parameters were generated.

ERROR RAISED AutoMLException Traceback (most recent call last) Cell In[16], line 12 3 # Initialize AutoML in Compete Mode 4 automl = AutoML( 5 # results_path = ModelPath, 6 mode="Perform", (...) 10 total_time_limit = 120 11 ) ---> 12 automl.fit(X_train, y_train) 13 # preds = automl.predict(X_test) 14 automl.score(X_test, y_test)

File c:\Users\vince\anaconda3\envs\adia\lib\site-packages\supervised\automl.py:368, in AutoML.fit(self, X, y, sample_weight, cv) 346 def fit( 347 self, 348 X: Union[numpy.ndarray, pandas.DataFrame], (...) 351 cv: Optional[Union[Iterable, List]] = None, 352 ): 353 """Fit the AutoML model. 354 355 Arguments: (...) 366 AutoML object: Returns self 367 """ --> 368 return self._fit(X, y, sample_weight, cv)

File c:\Users\vince\anaconda3\envs\adia\lib\site-packages\supervised\base_automl.py:1134, in BaseAutoML._fit(self, X, y, sample_weight, cv) 1131 self.verbose_print(f"AutoML best model: {self._best_model.get_name()}") 1133 except Exception as e: -> 1134 raise e 1136 return self

File c:\Users\vince\anaconda3\envs\adia\lib\site-packages\supervised\base_automl.py:1051, in BaseAutoML._fit(self, X, y, sample_weight, cv) 1049 if "hill_climbing" in step or step in ["ensemble", "stack"]: 1050 if len(self._models) == 0: -> 1051 raise AutoMLException( 1052 "No models produced. \nPlease check your data or" 1053 " submit a Github issue at https://github.com/mljar/mljar-supervised/issues/new." 1054 ) 1056 generated_params = [] 1057 if step in self._all_params:

AutoMLException: No models produced. Please check your data or submit a Github issue at https://github.com/mljar/mljar-supervised/issues/new.

xman14 avatar Jun 10 '23 15:06 xman14

Hi @xman14,

thanks for reporting the issue. Could you please attach code for loading the data?

pplonski avatar Jun 12 '23 11:06 pplonski

Hi @pplonski , Thx for answer, and sorry for delayed answer. There was already sample up there, but i guess you need all dataset: https://drive.google.com/file/d/1marJxQd05SIUwM5fp1oSN6mAiDzd0PXM/view?usp=sharing https://drive.google.com/file/d/1iZ1SXmmX0pK34imlWsIkQsgXxvOwFV2u/view?usp=sharing

Cheers

xman14 avatar Jun 18 '23 17:06 xman14