mljar / mljar-supervised

Python package for AutoML on Tabular Data with Feature Engineering, Hyper-Parameters Tuning, Explanations and Automatic Documentation
https://mljar.com
MIT License
2.97k stars 392 forks source link

bug during classification #543

Open bacoco opened 2 years ago

bacoco commented 2 years ago

It's append during google collab session. mlt=AutoML(mode='Compete',ml_task='binary_classification',algorithms=['Nearest Neighbors'],results_path='/content/drive/MyDrive/caggle_automl')

Thanks

AutoML directory: /content/drive/MyDrive/caggle_automl The task is binary_classification with evaluation metric logloss AutoML will use algorithms: ['Nearest Neighbors'] AutoML will stack models AutoML will ensemble available models 2022-05-22 16:58:46,387 supervised.exceptions ERROR No models produced. Please check your data or submit a Github issue at https://github.com/mljar/mljar-supervised/issues/new. AutoML steps: ['adjust_validation', 'simple_algorithms', 'default_algorithms', 'not_so_random', 'mix_encoding', 'golden_features', 'kmeans_features', 'insert_random_feature', 'features_selection', 'hill_climbing_1', 'hill_climbing_2', 'boost_on_errors', 'ensemble', 'stack', 'ensemble_stacked'] Skip adjust_validation because of the time limit. Skip simple_algorithms because no parameters were generated. Skip default_algorithms because of the time limit. Skip not_so_random because of the time limit. Skip mix_encoding because no parameters were generated. Skip golden_features because no parameters were generated. 'score' Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/supervised/tuner/mljar_tuner.py", line 210, in generate_params models, results_path, total_time_limit File "/usr/local/lib/python3.7/dist-packages/supervised/tuner/mljar_tuner.py", line 787, in get_kmeans_features_params current_models, time_limit=model_selection_time_limit, exclude_golden=True File "/usr/local/lib/python3.7/dist-packages/supervised/tuner/mljar_tuner.py", line 727, in df_models_algorithms df_models.sort_values(by="score", ascending=True, inplace=True) File "/usr/local/lib/python3.7/dist-packages/pandas/util/_decorators.py", line 311, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/pandas/core/frame.py", line 6259, in sort_values k = self._get_label_or_level_values(by, axis=axis) File "/usr/local/lib/python3.7/dist-packages/pandas/core/generic.py", line 1779, in _get_label_or_level_values raise KeyError(key) KeyError: 'score'

Skip kmeans_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) in () ----> 1 mlt.fit(X_train,y_train)

2 frames /usr/local/lib/python3.7/dist-packages/supervised/base_automl.py in _fit(self, X, y, sample_weight, cv) 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." 1046 )

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

Karlheinzniebuhr commented 1 year ago

Since today I'm getting this error with a codebase that gave no errors yesterday.

AutoMLException                           Traceback (most recent call last)
c:\dev\Python\forex\LAB_MLJAR_multi_target_regression_plus_n_5m.ipynb Cell 15 in <cell line: 8>()
      [5](vscode-notebook-cell:/c%3A/dev/Python/forex/LAB_MLJAR_multi_target_regression_plus_n_5m.ipynb#X20sZmlsZQ%3D%3D?line=4) model_path_3 = f'{mode}_%_change_close_{name}'
      [7](vscode-notebook-cell:/c%3A/dev/Python/forex/LAB_MLJAR_multi_target_regression_plus_n_5m.ipynb#X20sZmlsZQ%3D%3D?line=6) automl1 = AutoML(mode=mode, results_path=model_path_1)
----> [8](vscode-notebook-cell:/c%3A/dev/Python/forex/LAB_MLJAR_multi_target_regression_plus_n_5m.ipynb#X20sZmlsZQ%3D%3D?line=7) automl1.fit(X_train, y_train['label_high'])
      [9](vscode-notebook-cell:/c%3A/dev/Python/forex/LAB_MLJAR_multi_target_regression_plus_n_5m.ipynb#X20sZmlsZQ%3D%3D?line=8) automl2 = AutoML(mode=mode, results_path=model_path_2)
     [10](vscode-notebook-cell:/c%3A/dev/Python/forex/LAB_MLJAR_multi_target_regression_plus_n_5m.ipynb#X20sZmlsZQ%3D%3D?line=9) automl2.fit(X_train, y_train['label_low'])

File c:\ProgramData\Anaconda3\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:\ProgramData\Anaconda3\lib\site-packages\supervised\base_automl.py:1126, in BaseAutoML._fit(self, X, y, sample_weight, cv)
...
   1048 generated_params = []
   1049 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.