tidymodels / dials

Tools for creating tuning parameter values
https://dials.tidymodels.org/
Other
113 stars 27 forks source link

resolve issues with brulee parameters with the same dials function #336

Closed topepo closed 3 months ago

topepo commented 4 months ago

brulee now has some arguments that use the same dials parameter function; for neural networks with two layers of hidden units, the arguments are hidden_units and hidden_units_2.

This causes an issue where methods like autoplot() fail because the labels for the two arguments are the same (and it renames the columns to be their arguments).

We discussed two solutions to this:

  1. Allow parsnip to modify the label value when calling eval_call_info(). With this, we can add label to the tunable() method to solve the issue.
  2. Make two new dials parameter functions, hidden_units_2 and activations_2 with different labels.

The downside to the first is that if users update the dials parameters, they will probably not know that they must also pass the label argument. This won’t appear as an issue until a function like autoplot() is called.

The downside to the second approach is code duplication.

I favor the second option; the cost of a little code duplication is better than having users run into issues with no real way of alerting them to the underlying issue. Also, I don’t think we’ll have this issue anywhere else.