How to configure conditonalparameterspec for the below code where, when penalty is l2 solver should be ‘sag’ and when penalty is ‘l1’, solver should be ‘saga’.
To configure ConditionalParameterSpec for hyperparameter tuning in Google Cloud’s Vertex AI, you need to define conditional hyperparameters based on the value of the other hyperparameter. Here’s a step-by-step guide:
Define the main hyperparameter: These are the primary hyperparameter that will be tuned
Set up conditional hyperparameter: Use ConditionalParameterSpec to specify the conditions under which certain hyperparameters should be used.
Conditional parameters in hyperparameter tuning allow you to specify that certain hyperparameters should only be considered when specific conditions are met. This is particularly useful when you have hyperparameters that are only relevant under certain circumstances.
In your case, you want the ‘solver’ parameter to depend on the value of the ‘penalty’ parameter. You can consider the following on how the ConditionalParameterSpec works:
Parent Parameter: This is the parameter that determines the condition. In your example, ‘penalty’ is the parent parameter.
Conditional Parameter Specs: These are parameters that are conditionally included based on the value of the parent parameter. For each possible value of the parent parameter, you specify a corresponding set of parameters.
I have the same issue as @revanthps , I cannot figure out how to set up the ConditionalParameterSpec using the Python SDK. Would someone be able to provide an example. Thanks in advanced.