Skip to content

Commit 281df69

Browse files
committed
error for learners of class `AutoTuner`
1 parent 1e8d217 commit 281df69

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

R/double_ml.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,10 +1245,16 @@ DoubleML = R6Class("DoubleML",
12451245
invisible(self)
12461246
},
12471247
assert_learner = function(learner, learner_name, Regr, Classif) {
1248+
12481249
assert(
12491250
check_character(learner, max.len = 1),
12501251
check_class(learner, "Learner"))
12511252

1253+
if (test_class(learner, "AutoTuner")) {
1254+
stop(paste0(
1255+
"Learners of class 'AutoTuner' are not supported."
1256+
))
1257+
}
12521258
if (is.character(learner)) {
12531259
# warning("Learner provision by character() will be deprecated in the
12541260
# future.")

0 commit comments

Comments
 (0)