Skip to content

[Bug]: Missing Metric Configuration in Sweep Example #601

Description

@GabrieleDian

Tell us what happened?

Location

  • File path:colabs/boosting/Credit_Scorecards_with_XGBoost_and_W&B.ipynb
  • Section: HyperParameter Sweep

The current sweep example miss the metric configuration:

sweep_config = {
    "method": "random",
    "parameters": {
        "learning_rate": {
            "min": 0.001,
            "max": 1.0
        },
        "gamma": {
            "min": 0.001,
            "max": 1.0
        },
        "min_child_weight": {
            "min": 1,
            "max": 150
        },
        "early_stopping_rounds": {
            "values": [10, 20, 30, 40]
        },
    }
}

As a result, Sweep visualizations show parameter values (e.g., min_child_weight) as the optimization goal instead of the actual metric

Suggested Fix

Add the missing metric configuration:

sweep_config = {
    "method": "random",
    "metric": {
        "goal": "minimize",  
        "name": "val_log_loss"  
    },
    "parameters": {
        # ... existing parameters
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions