Rename .config from tune_grid and tune_bayes

tune_grid produces default .config names of "Preprocessor1_01", "Preprocessor1_02", etc. tune_bayes produces default .config names "Iter1", "Iter2", etc. Is there a way to rename these? Either within tune_grid/tune_bayes and/or after the results are produced?

I guess but you might be playing with fire.

Do you just not like them or need the data for something else?

We're going to change the pattern that is generated later this year so feedback would be good.

I am running multiple rounds of tune_grid with tweaked parameters, but would like to compare the results against one another and combine the top performing ones. Each instance of tune_grid produces the "Preprocessor1_Model01" etc names with no way to differentiate between the two. When collecting metrics I can edit the names, but combining any results more complicated than that or producing fits will retain the original name of the model.

I was hoping there was a built-in way that I was missing--if there isn't then you're right, with the construction of some of these objects it might not be possible to do it safely?

I think changing them is fine, but you must do it for each row of the .metrics column (and the other optional ones like .predictions).

Those columns are the "source of truth" so that would probably do it.

It's true that there isn't anything about the parameter names and their values in there. That's really hard to do (especially if you want it readable), and potentially doing joins on values that, when formatted, might have a difference that is < 10^-5 has a bad "code smell."

However, I've often wondered, "What does that .config mean?" So, there is an unmet need.

and combine the top performing ones

That lost me so more details would help. Like stacking?

When I said

We're going to change the pattern

it will be (hopefully) shorter, like "pre01_mod3_post12" since we are adding postprocessing. For something like xgboost, mod3 might be a combination of eight parameters :grimacing:

That lost me so more details would help. Like stacking?

I ran tune_grid on two different space-filling hyperparameter grids to see how the parameters in the different grids fared. I chose a selection of the top hyperparameter combinations from each to run through tune_bayes (I know it's typical to just do select_best, but sometimes iterating on combinations with slightly worse metrics have produced better combinations overall). Then I fit. Right now tune_bayes and fitting all have to be done separately between everything with the two grids because the first grid and its bayes results have .config names "Preprocessor_Model01, Preprocessor_Model02, Iter1, Iter2, etc" and the second grid and its bayes results have the same names. It would be great if there were a way to rename these .config values so that I could run the chosen hyperparameter combinations from the grids through tune_bayes at once without different combinations having the same names.

Unfortunately, some of the objects I'm working with are large enough on my system that I'm not totally sure how I would be able to run renaming on everything that needs to be renamed (for some RStudio freezes just through glimpse or entering the object name into the console). So I was hoping the naming convention could be implemented from the start.