Skip to content

Commit 2c80f4e

Browse files
authored
comment about $validate
1 parent d82da43 commit 2c80f4e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

R/PipeOpLearner.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ PipeOpLearner = R6Class("PipeOpLearner", inherit = PipeOp,
206206

207207
mlr_pipeops$add("learner", PipeOpLearner, list(R6Class("Learner", public = list(properties = character(0), id = "learner", task_type = "classif", param_set = ps(), packages = "mlr3pipelines"))$new())) # nolint
208208

209+
# Q: Why do we have two different paths for setting $validate, the set_validate() and the `$validate` AB?
210+
# A: `$validate` is lower level machinery. `set_validate()` has optional arguments, e.g. `ids = ...`.
211+
# `set_validate.PipeOpLearner` might be called by `set_validate.GraphLearner` and allows passing down
212+
# further arguments in case the pipeoplearner was another graph learner e.g.
209213
#' @export
210214
set_validate.PipeOpLearner = function(learner, validate, ...) {
211215
assert_po_validate(validate)

0 commit comments

Comments
 (0)