Skip to content

Commit

Permalink
fix check for adapt_engaged
Browse files Browse the repository at this point in the history
  • Loading branch information
venpopov committed Mar 21, 2024
1 parent 41afbf1 commit 695dba6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/args.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 695dba6

Please sign in to comment.