diff --git a/R/args.R b/R/args.R index ca1ebb41..01378ddf 100644 --- a/R/args.R +++ b/R/args.R @@ -286,9 +286,6 @@ SampleArgs <- R6::R6Class( if (is.logical(self$save_metric)) { self$save_metric <- as.integer(self$save_metric) } - if (!self$adapt_engaged & !is.null(self$save_metric)) { - self$save_metric <- 0 - } invisible(self) }, validate = function(num_procs) { @@ -817,6 +814,10 @@ validate_sample_args <- function(self, num_procs) { len = 1, null.ok = TRUE) + if (is.null(self$adapt_engaged) || (!self$adapt_engaged && !is.null(self$save_metric))) { + self$save_metric <- 0 + } + invisible(TRUE) }