diff --git a/R/helper.R b/R/helper.R index dde0d77f..c2e45241 100644 --- a/R/helper.R +++ b/R/helper.R @@ -1,6 +1,9 @@ measures_to_codomain = function(measures) { measures = as_measures(measures) domains = map(measures, function(s) { + if (is.na(s$minimize)) { + stopf("Measure %s has its `minimize` field set to NA, which is disallowed when tuning.", s$id) + } p_dbl(tags = ifelse(s$minimize, "minimize", "maximize")) }) names(domains) = ids(measures) diff --git a/man/AutoTuner.Rd b/man/AutoTuner.Rd index afb4408b..fd7fecb8 100644 --- a/man/AutoTuner.Rd +++ b/man/AutoTuner.Rd @@ -197,6 +197,7 @@ Hash (unique identifier) for this partial object, excluding some components whic \if{html}{\out{
Inherited methods