tune
tune copied to clipboard
helper to provide minimal information for searches taking `initial` results
The initial argument to tune_bayes(), tune_sim_anneal(), etc(?) can be expressed as either 1) a previous tuning result or 2) a number indicating the number of initial grid points to evaluate. In case 1), when initial searches result in a large object—as a result of large input data, many grid points, etc—that I know I will want to pass along to another tuning function later (i.e. in another session), I've often wished there were some way to "butcher" the object so that it only contains the information that will be extracted when it's supplied as initial. That "butcher"ing process may even be collect_metrics(), in which case we could just add another initial parameterization.
This may actually be an issue with serialization—would be worth comparing object-in-memory vs. on disk sizes to ensure that rsample serialization tricks carry over inside of tune objects. If not, some notes from bringing this up in team meeting:
- This probably ought to be situated as an
extract_*()function rather than a butcher method. - That
extract_*()function ought to be the "happy path" inside functions that take initial results—i.e. if a function takes in initial results, it ought to convert to theextract_*()ed object and then use it internally.