Skip to content

Commit 7b10b91

Browse files
Update R/compile_keras_grid.R
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a3ee01d commit 7b10b91

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

R/compile_keras_grid.R

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,15 @@ compile_keras_grid <- function(spec, grid, x, y) {
148148
#' The columns for `compiled_model`, `model_summary`, and `error` are removed.
149149
#' @export
150150
extract_valid_grid <- function(compiled_grid) {
151-
if (!is.data.frame(compiled_grid) || !all(c("error", "compiled_model", "model_summary") %in% names(compiled_grid))) {
152-
stop("`compiled_grid` must be a data frame produced by `compile_keras_grid()`.")
151+
if (
152+
!is.data.frame(compiled_grid) ||
153+
!all(
154+
c("error", "compiled_model", "model_summary") %in% names(compiled_grid)
155+
)
156+
) {
157+
stop(
158+
"`compiled_grid` must be a data frame produced by `compile_keras_grid()`."
159+
)
153160
}
154161

155162
compiled_grid %>%

0 commit comments

Comments
 (0)