Hyperparameters for custom tasks is off by default. Contact your DataRobot representative or administrator for information on enabling the feature.
Feature flag: Enable Custom Task Hyperparameters
Now available for preview, you can define hyperparameters for a custom task. Add and configure hyperparameters in the model-metadata.yaml file.
You must specify two values for each hyperparameter: the name and type. The type can be one of int, float, string, select, or multi. All types support a default value. Integer and float values can have a min and max value specified. Certain type parameters require a list in the values field to define the accepted values. String type hyperparameters can accept any arbitrary string. Multi types have values specified as multiple of the aforementioned types, e.g. float and select.
View an example set of hyperparameters below.
hyperparameters:# int: Integer value, must provide a min and max. Default is optional. Uses the min value if not provided.-name:seedtype:intmin:0max:10000default:64# int: Integer value, must provide a min and max. Default is optional. Uses the min value if not provided.-name:kbins_n_binstype:intmin:2max:1000default:10# select: A discrete set of unique values, similar to an enum. Default is optional. Will use the first value if# not provided.-name:kbins_strategytype:selectvalues:-uniform-quantile-kmeansdefault:quantile# multi: A parameter that can be of multiple types (int/float/select). Default is optional. Will use the first parameter# type's default value. This example uses select, the first entry, or for int/float, the min value.-name:missing_values_strategytype:multivalues:float:min:-1000000.0max:1000000.0select:values:-median-mean-most_frequentdefault:median# string: Unicode string. Default is optional. Is an empty string if not provided.-name:print_messagetype:stringdefault:"helloworldπ"
Access a custom task's hyperparameters via the fit method and add parameters to the fit function arguments, as shown below.