Get the best parameter configuration from an optimized module. This is the parameter set that achieved the highest (or lowest, for minimization) score during optimization.
See also
Other optimizer accessors:
apply_best_config(),
best_demos(),
config_diff(),
export_module_code(),
optimization_summary(),
top_trials()
Examples
if (FALSE) {
mod <- module(signature("text -> sentiment"), type = "predict")
mod$optimize_grid(
data = train_data,
metric = metric_exact_match(),
parameters = list(temperature = c(0.3, 0.7, 1.0))
)
best_params(mod)
# $temperature
# [1] 0.7
}
