From d0f3312e7d218a57ba7c4196d0d98ef0beffb531 Mon Sep 17 00:00:00 2001 From: Leonidas Zhak <70497898+LeonidasZhak@users.noreply.github.com> Date: Fri, 5 Jun 2026 18:57:37 +0800 Subject: [PATCH] Clarify tune_grid object documentation --- NEWS.md | 3 +++ R/tune_grid.R | 3 +++ man/tune_grid.Rd | 5 ++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 5b188176..3c525db8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,9 @@ ## Bug Fixes +* The `tune_grid()` documentation no longer states that `object` must be + finalized without tuning parameters (#982). + * Resampling and tuning would fail for quantile regression models if they passed a quantile regression metric (#1186) # tune 2.1.0 diff --git a/R/tune_grid.R b/R/tune_grid.R index 6ced2581..45acda5c 100644 --- a/R/tune_grid.R +++ b/R/tune_grid.R @@ -6,6 +6,9 @@ #' #' @inheritParams last_fit #' @inheritParams fit_resamples +#' @param object A `parsnip` model specification or an unfitted +#' [workflows::workflow()]. Tuning parameters may be marked with +#' [tune()] and are evaluated over the values supplied in `grid`. #' @param param_info A [dials::parameters()] object or `NULL`. If none is given, #' a parameters set is derived from other arguments. Passing this argument can #' be useful when parameter ranges need to be customized. diff --git a/man/tune_grid.Rd b/man/tune_grid.Rd index 8080293b..edf56582 100644 --- a/man/tune_grid.Rd +++ b/man/tune_grid.Rd @@ -33,9 +33,8 @@ tune_grid(object, ...) } \arguments{ \item{object}{A \code{parsnip} model specification or an unfitted -\link[workflows:workflow]{workflow()}. No tuning parameters are allowed; if arguments -have been marked with \link[hardhat:tune]{tune()}, their values must be -\link[=finalize_model]{finalized}.} +\link[workflows:workflow]{workflow()}. Tuning parameters may be marked with +\code{\link[=tune]{tune()}} and are evaluated over the values supplied in \code{grid}.} \item{...}{Not currently used.}