Skip to content

Optuna Mode doesn't work when tuning LightGBM #683

@AkshayNovacene

Description

@AkshayNovacene

Great package, I love that it supports a wide range of functionalities.

However, when I try to create an AutoML instance in Optuna mode for Light GBM, it fails and gives the following error message, it works when I use other ML models though:

[W 2023-12-11 18:14:57,553] 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..
[W 2023-12-11 18:14:57,554] Trial 0 failed with value None.

These are the parameter settings for AutoML:

automl = AutoML(
    mode="Optuna",
    eval_metric="f1",
    golden_features=False,
    ml_task='binary_classification',
    kmeans_features=False,
    start_random_models=1,
    stack_models=False,
    train_ensemble=False,
    optuna_time_budget=100,
    optuna_verbose=True,
    features_selection=False,
    algorithms=["LightGBM"],
    validation_strategy={
        "validation_type": "kfold",
        "k_folds": 3,
        "shuffle": True,
        "stratify": True,
    }

It would be great if you could help me with this.

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