Skip to content

LightgbmObjective train() got an unexpected keyword argument 'verbose_eval' #645

@pikepikepikepike

Description

@pikepikepikepike

I'm using
automl = AutoML(mode="Optuna")
with a regression problem and get the following error:

## Error for 1_Optuna_LightGBM

No trials are completed yet.
Traceback (most recent call last):
  File "C:\Users\james.pike\AppData\Roaming\Python\Python310\site-packages\supervised\base_automl.py", line 1195, in _fit
    trained = self.train_model(params)
  File "C:\Users\james.pike\AppData\Roaming\Python\Python310\site-packages\supervised\base_automl.py", line 401, in train_model
    mf.train(results_path, model_subpath)
  File "C:\Users\james.pike\AppData\Roaming\Python\Python310\site-packages\supervised\model_framework.py", line 223, in train
    self.learner_params = optuna_tuner.optimize(
  File "C:\Users\james.pike\AppData\Roaming\Python\Python310\site-packages\supervised\tuner\optuna\tuner.py", line 225, in optimize
    best = study.best_params
  File "C:\Users\james.pike\AppData\Roaming\Python\Python310\site-packages\optuna\study\study.py", line 117, in best_params
    return self.best_trial.params
  File "C:\Users\james.pike\AppData\Roaming\Python\Python310\site-packages\optuna\study\study.py", line 160, in best_trial
    return copy.deepcopy(self._storage.get_best_trial(self._study_id))
  File "C:\Users\james.pike\AppData\Roaming\Python\Python310\site-packages\optuna\storages\_in_memory.py", line 234, in get_best_trial
    raise ValueError("No trials are completed yet.")
ValueError: No trials are completed yet.

On the command line after each attempt it says:

Exception in LightgbmObjective train() got an unexpected keyword argument 'verbose_eval'
�[33m[W 2023-08-18 15:44:52,803]�[0m Trial 0 failed with parameters: {'learning_rate': 0.1, 'num_leaves': 1598, 'lambda_l1': 2.840098794801191e-06, 'lambda_l2': 3.0773599420974e-06, 'feature_fraction': 0.8613105322932351, 'bagging_fraction': 0.970697557159987, 'bagging_freq': 7, 'min_data_in_leaf': 36, 'extra_trees': False} because of the following error: The value None could not be cast to float..�[0m
�[33m[W 2023-08-18 15:44:52,806]�[0m Trial 0 failed with value None.�[0m

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions