Nested sweep configuration for python script

I have a nested structure for my sweep configuration. Referencing wandb doc and nested sweep configuration, I created my sweep configuration in the following structure:

sweep_config = {
    "method": "random",
    "metric": {"name": "val.loss", "goal": "minimize"},
    "parameters": {
        "batch_size": {"values": [16, 32, 64]},
        "lr": {"distribution": "inv_log_uniform_values", "min": 0.001, "max": 0.1},
        "model_params": {
            "parameters": {
                "out_features": {"values":[100, 125, 150, 175, 200]},
                "p": {"values":[0, 0.1, 0.2, 0.3, 0.4, 0.5]}
            }
        }
    }
}

However, running sweep with this configuration gives me an error like the following: “Invalid sweep config: invalid hyperparameter configuration: model_params”. I would like to keep this nested structure since it is convenient, but how can I change the configuration to make the sweep work?

Hi @hlee2745!

Thank you for writing in!

Out of curiosity, could you please see if you will be getting the same error for this sweep config:

sweep_config = {
    "method": "random",
    "metric": {"name": "val.loss", "goal": "minimize"},
    "parameters": {
        "batch_size": {"values": [16, 32, 64]},
        "lr": {"distribution": "log_uniform", "min": 0.001, "max": 0.1},
        "out_features": {"values": [100, 125, 150, 175, 200]},
        "p": {"values": [0, 0.1, 0.2, 0.3, 0.4, 0.5]}
    }
}

Although we do support nested sweeps, I wonder if the example you have brought above is not something we can do.

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

Hi, since we have not heard back from you, we are going to close this request. If you would like to reopen the conversation, please let us know! Unfortunately, at the moment, we do not receive notifications if a thread reopens on Discourse. So, please feel free to create a new ticket regarding your concern if you’d like to continue the conversation.

is it possible to have multiple Goals in the sweep_config. For Example, maximize one variable and minimize some other variable ? is this possible?