Skip to content

Handle all models with error #216

Description

@pplonski

The AutoML crashes if all models have error. It should be handled more gently.

The example of crash:

AutoML directory: AutoML_88
The task is multiclass_classification with evaluation metric logloss
AutoML will use algorithms: ['MLP']
AutoML steps: ['simple_algorithms', 'default_algorithms', 'not_so_random', 'hill_climbing_1', 'hill_climbing_2']
Skip simple_algorithms because no parameters were generated.
* Step default_algorithms will try to check up to 1 model
The least populated class in y has only 2 members, which is less than n_splits=5.
There was an error during 1_Default_MLP training.
Please check AutoML_88/errors.md for details.
* Step not_so_random will try to check up to 4 models
There was an error during 1_MLP training.
Please check AutoML_88/errors.md for details.
There was an error during 2_MLP training.
Please check AutoML_88/errors.md for details.
There was an error during 3_MLP training.
Please check AutoML_88/errors.md for details.
There was an error during 4_MLP training.
Please check AutoML_88/errors.md for details.
Traceback (most recent call last):
  File "examples/scripts/nn_benchmark.py", line 53, in <module>
    mlp.fit(train_X, train_y)
  File "/home/piotr/sandbox/mljar-supervised/supervised/automl.py", line 276, in fit
    return self._fit(X, y)
  File "/home/piotr/sandbox/mljar-supervised/supervised/base_automl.py", line 723, in _fit
    raise e
  File "/home/piotr/sandbox/mljar-supervised/supervised/base_automl.py", line 672, in _fit
    step, self._models, self._results_path, self._stacked_models
  File "/home/piotr/sandbox/mljar-supervised/supervised/tuner/mljar_tuner.py", line 105, in generate_params
    return self.get_hill_climbing_params(models)
  File "/home/piotr/sandbox/mljar-supervised/supervised/tuner/mljar_tuner.py", line 335, in get_hill_climbing_params
    unique_model_types = np.unique(df_models.model_type)
  File "/home/piotr/sandbox/mljar-supervised/venv_mljs/lib/python3.6/site-packages/pandas/core/generic.py", line 5136, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'model_type'
  • the MLP algorithm in the example is experimental. It should be Neural Network used instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions