Running ‘testthat.R’ [61s/103s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > if (requireNamespace("testthat", quietly = TRUE)) {
  +   library("testthat")
  +   library("checkmate") # for more expect_*() functions
  +   library("mlr3proba")
  +   test_check("mlr3proba")
  + }
  Loading required package: mlr3
  [ FAIL 23 | WARN 19 | SKIP 2 | PASS 1725 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test_PredictionSurv.R:12:3): Internally constructed Prediction ─────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_PredictionSurv.R:12:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Error (test_PredictionSurv.R:23:3): c ───────────────────────────────────────
  Error in `.__PredictionSurv__.simplify_distr(self = self, private = private, 
      super = super, x = x)`: 'x' is not a 'VectorDistribution'
  Backtrace:
       ▆
    1. ├─base::do.call(c, preds) at test_PredictionSurv.R:23:2
    2. ├─base `<fn>`(`<PrdctnSr>`, `<PrdctnSr>`)
    3. └─mlr3:::c.Prediction(`<PrdctnSr>`, `<PrdctnSr>`)
    4.   ├─mlr3::as_prediction(pdata, check = FALSE)
    5.   └─mlr3proba:::as_prediction.PredictionDataSurv(pdata, check = FALSE)
    6.     ├─mlr3misc::invoke(PredictionSurv$new, check = check, .args = x)
    7.     │ └─base::eval.parent(expr, n = 1L)
    8.     │   └─base::eval(expr, p)
    9.     │     └─base::eval(expr, p)
   10.     └─PredictionSurv$new(...)
   11.       └─mlr3proba initialize(...)
   12.         └─mlr3proba:::.__PredictionSurv__initialize(...)
   13.           └─private$.simplify_distr(distr)
   14.             └─mlr3proba:::.__PredictionSurv__.simplify_distr(...)
  ── Failure (test_PredictionSurv.R:52:3): data.frame roundtrip ──────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p2) at test_PredictionSurv.R:52:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_PredictionSurv.R:64:3): as_prediction_surv ────────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(as_prediction_surv(as.data.table(p))) at test_PredictionSurv.R:64:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_PredictionSurv.R:70:3): filtering ─────────────────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_PredictionSurv.R:70:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_mlr_measures.R:43:3): unintegrated_prob_losses ────────────────
  `prediction$score(msr)` produced warnings.
  ── Failure (test_pipelines.R:11:3): crankcompositor ────────────────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_pipelines.R:11:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_pipelines.R:22:3): distrcompositor ────────────────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_pipelines.R:22:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_pipelines.R:68:3): survtoregr 1 ───────────────────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_pipelines.R:68:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_pipelines.R:104:3): survtoregr 3 ──────────────────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_pipelines.R:104:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_pipeop_crankcompositor.R:12:3): PipeOpCrankCompositor - estimate ──
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_pipeop_crankcompositor.R:12:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_pipeop_crankcompositor.R:20:3): no params ─────────────────────
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_pipeop_crankcompositor.R:20:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Error (test_pipeop_crankcompositor.R:26:3): response ────────────────────────
  Error in `.__PredictionSurv__.simplify_distr(self = self, private = private, 
      super = super, x = x)`: 'x' is not a 'VectorDistribution'
  This happened PipeOp compose_crank's $predict()
  Backtrace:
       ▆
    1. ├─po$predict(list(lrn("surv.kaplan")$train(task)$predict(task))) at test_pipeop_crankcompositor.R:26:2
    2. │ └─mlr3pipelines:::.__PipeOp__predict(...)
    3. │   ├─base::withCallingHandlers(...)
    4. │   └─private$.predict(input)
    5. │     └─mlr3proba:::.__PipeOpCrankCompositor__.predict(...)
    6. │       └─PredictionSurv$new(...)
    7. │         └─mlr3proba initialize(...)
    8. │           └─mlr3proba:::.__PredictionSurv__initialize(...)
    9. │             └─private$.simplify_distr(distr)
   10. │               └─mlr3proba:::.__PredictionSurv__.simplify_distr(...)
   11. │                 └─base::stop("'x' is not a 'VectorDistribution'")
   12. └─base::.handleSimpleError(...)
   13.   └─mlr3pipelines h(simpleError(msg, call))
  ── Error (test_pipeop_crankcompositor.R:49:3): overwrite crank ─────────────────
  Error in `.__PredictionSurv__.simplify_distr(self = self, private = private, 
      super = super, x = x)`: 'x' is not a 'VectorDistribution'
  This happened PipeOp compose_crank's $predict()
  Backtrace:
       ▆
    1. ├─pl$train(task)$predict(task) at test_pipeop_crankcompositor.R:49:2
    2. │ └─mlr3:::.__Learner__predict(...)
    3. │   └─mlr3:::learner_predict(self, task, row_ids)
    4. │     └─mlr3misc::encapsulate(...)
    5. │       ├─mlr3misc::invoke(...)
    6. │       │ └─base::eval.parent(expr, n = 1L)
    7. │       │   └─base::eval(expr, p)
    8. │       │     └─base::eval(expr, p)
    9. │       └─mlr3 .f(task = `<TaskSurv>`, learner = `<GrphLrnr>`)
   10. │         └─get_private(learner)$.predict(task)
   11. │           └─mlr3pipelines:::.__GraphLearner__.predict(...)
   12. │             └─self$graph$predict(task)
   13. │               └─mlr3pipelines:::.__Graph__predict(...)
   14. │                 └─mlr3pipelines:::graph_reduce(self, input, "predict", single_input)
   15. │                   └─op[[fun]](input)
   16. │                     └─mlr3pipelines:::.__PipeOp__predict(...)
   17. │                       ├─base::withCallingHandlers(...)
   18. │                       └─private$.predict(input)
   19. │                         └─mlr3proba:::.__PipeOpCrankCompositor__.predict(...)
   20. │                           └─PredictionSurv$new(...)
   21. │                             └─mlr3proba initialize(...)
   22. │                               └─mlr3proba:::.__PredictionSurv__initialize(...)
   23. │                                 └─private$.simplify_distr(distr)
   24. │                                   └─mlr3proba:::.__PredictionSurv__.simplify_distr(...)
   25. │                                     └─base::stop("'x' is not a 'VectorDistribution'")
   26. └─base::.handleSimpleError(...)
   27.   └─mlr3pipelines h(simpleError(msg, call))
  ── Error (test_pipeop_crankcompositor.R:57:3): overwrite response ──────────────
  Error in `.__PredictionSurv__.simplify_distr(self = self, private = private, 
      super = super, x = x)`: 'x' is not a 'VectorDistribution'
  Backtrace:
      ▆
   1. └─PredictionSurv$new(...) at test_pipeop_crankcompositor.R:57:2
   2.   └─mlr3proba initialize(...)
   3.     └─mlr3proba:::.__PredictionSurv__initialize(...)
   4.       └─private$.simplify_distr(distr)
   5.         └─mlr3proba:::.__PredictionSurv__.simplify_distr(...)
  ── Error (test_pipeop_crankcompositor.R:76:3): neg crank ───────────────────────
  Error in `.__PredictionSurv__.simplify_distr(self = self, private = private, 
      super = super, x = x)`: 'x' is not a 'VectorDistribution'
  This happened PipeOp compose_crank's $predict()
  Backtrace:
       ▆
    1. ├─pl$train(task)$predict(task) at test_pipeop_crankcompositor.R:76:2
    2. │ └─mlr3:::.__Learner__predict(...)
    3. │   └─mlr3:::learner_predict(self, task, row_ids)
    4. │     └─mlr3misc::encapsulate(...)
    5. │       ├─mlr3misc::invoke(...)
    6. │       │ └─base::eval.parent(expr, n = 1L)
    7. │       │   └─base::eval(expr, p)
    8. │       │     └─base::eval(expr, p)
    9. │       └─mlr3 .f(task = `<TaskSurv>`, learner = `<GrphLrnr>`)
   10. │         └─get_private(learner)$.predict(task)
   11. │           └─mlr3pipelines:::.__GraphLearner__.predict(...)
   12. │             └─self$graph$predict(task)
   13. │               └─mlr3pipelines:::.__Graph__predict(...)
   14. │                 └─mlr3pipelines:::graph_reduce(self, input, "predict", single_input)
   15. │                   └─op[[fun]](input)
   16. │                     └─mlr3pipelines:::.__PipeOp__predict(...)
   17. │                       ├─base::withCallingHandlers(...)
   18. │                       └─private$.predict(input)
   19. │                         └─mlr3proba:::.__PipeOpCrankCompositor__.predict(...)
   20. │                           └─PredictionSurv$new(...)
   21. │                             └─mlr3proba initialize(...)
   22. │                               └─mlr3proba:::.__PredictionSurv__initialize(...)
   23. │                                 └─private$.simplify_distr(distr)
   24. │                                   └─mlr3proba:::.__PredictionSurv__.simplify_distr(...)
   25. │                                     └─base::stop("'x' is not a 'VectorDistribution'")
   26. └─base::.handleSimpleError(...)
   27.   └─mlr3pipelines h(simpleError(msg, call))
  ── Failure (test_pipeop_distrcompositor.R:19:3): PipeOpDistrCompositor - overwrite = TRUE ──
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(p) at test_pipeop_distrcompositor.R:19:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Failure (test_pipeop_distrcompositor.R:24:3): PipeOpDistrCompositor - overwrite = TRUE ──
  Check on 'p$distr' failed: Must inherit from class 'VectorDistribution', but has classes 'Matdist','SDistribution','Distribution','R6'
  Backtrace:
      ▆
   1. └─global expect_prediction_surv(gr$train(task)$predict(task)) at test_pipeop_distrcompositor.R:24:2
   2.   └─checkmate::expect_class(p$distr, "VectorDistribution")
   3.     └─checkmate::makeExpectation(x, res, info, label)
  ── Error (test_pipeop_survavg.R:19:3): equal weights ───────────────────────────
  Error in `p$distr$cdf`: $ operator is invalid for atomic vectors
  Backtrace:
      ▆
   1. └─testthat::expect_equal(...) at test_pipeop_survavg.R:19:2
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Error (test_pipeop_survavg.R:33:3): unequal weights ─────────────────────────
  Error in `p$distr$cdf`: $ operator is invalid for atomic vectors
  Backtrace:
      ▆
   1. └─testthat::expect_equal(...) at test_pipeop_survavg.R:33:2
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Error (test_pipeop_survavg.R:47:3): response ────────────────────────────────
  Error in `.__PredictionSurv__.simplify_distr(self = self, private = private, 
      super = super, x = x)`: 'x' is not a 'VectorDistribution'
  This happened PipeOp compose_crank's $predict()
  Backtrace:
       ▆
    1. ├─mlr3pipelines::ppl("crankcompositor", lrn("surv.kaplan"), response = TRUE, ... at test_pipeop_survavg.R:47:2
    2. │ └─mlr3:::.__Learner__predict(...)
    3. │   └─mlr3:::learner_predict(self, task, row_ids)
    4. │     └─mlr3misc::encapsulate(...)
    5. │       ├─mlr3misc::invoke(...)
    6. │       │ └─base::eval.parent(expr, n = 1L)
    7. │       │   └─base::eval(expr, p)
    8. │       │     └─base::eval(expr, p)
    9. │       └─mlr3 .f(task = `<TaskSurv>`, learner = `<GrphLrnr>`)
   10. │         └─get_private(learner)$.predict(task)
   11. │           └─mlr3pipelines:::.__GraphLearner__.predict(...)
   12. │             └─self$graph$predict(task)
   13. │               └─mlr3pipelines:::.__Graph__predict(...)
   14. │                 └─mlr3pipelines:::graph_reduce(self, input, "predict", single_input)
   15. │                   └─op[[fun]](input)
   16. │                     └─mlr3pipelines:::.__PipeOp__predict(...)
   17. │                       ├─base::withCallingHandlers(...)
   18. │                       └─private$.predict(input)
   19. │                         └─mlr3proba:::.__PipeOpCrankCompositor__.predict(...)
   20. │                           └─PredictionSurv$new(...)
   21. │                             └─mlr3proba initialize(...)
   22. │                               └─mlr3proba:::.__PredictionSurv__initialize(...)
   23. │                                 └─private$.simplify_distr(distr)
   24. │                                   └─mlr3proba:::.__PredictionSurv__.simplify_distr(...)
   25. │                                     └─base::stop("'x' is not a 'VectorDistribution'")
   26. └─base::.handleSimpleError(...)
   27.   └─mlr3pipelines h(simpleError(msg, call))
  ── Error (test_pipeop_survavg.R:65:3): surv_averager ───────────────────────────
  Error in `p$distr$cdf`: $ operator is invalid for atomic vectors
  Backtrace:
      ▆
   1. └─testthat::expect_equal(p$distr$cdf(1:3), p2$distr$cdf(1:3)) at test_pipeop_survavg.R:65:2
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Error (test_resample.R:9:3): resample-step ──────────────────────────────────
  Error in `.__PredictionSurv__.simplify_distr(self = self, private = private, 
      super = super, x = x)`: 'x' is not a 'VectorDistribution'
  Backtrace:
       ▆
    1. └─global expect_resample_result(rr) at test_resample.R:9:2
    2.   ├─global expect_prediction(rr$prediction())
    3.   │ └─checkmate::expect_r6(...)
    4.   │   └─checkmate::checkR6(...)
    5.   └─rr$prediction()
    6.     └─mlr3:::.__ResampleResult__prediction(...)
    7.       └─private$.data$prediction(private$.view, predict_sets)
    8.         └─mlr3:::.__ResultData__prediction(...)
    9.           ├─base::do.call(c, self$predictions(view = view, predict_sets = predict_sets))
   10.           ├─base `<fn>`(`<PrdctnSr>`, `<PrdctnSr>`, `<PrdctnSr>`)
   11.           └─mlr3:::c.Prediction(`<PrdctnSr>`, `<PrdctnSr>`, `<PrdctnSr>`)
   12.             ├─mlr3::as_prediction(pdata, check = FALSE)
   13.             └─mlr3proba:::as_prediction.PredictionDataSurv(pdata, check = FALSE)
   14.               ├─mlr3misc::invoke(PredictionSurv$new, check = check, .args = x)
   15.               │ └─base::eval.parent(expr, n = 1L)
   16.               │   └─base::eval(expr, p)
   17.               │     └─base::eval(expr, p)
   18.               └─PredictionSurv$new(...)
   19.                 └─mlr3proba initialize(...)
   20.                   └─mlr3proba:::.__PredictionSurv__initialize(...)
   21.                     └─private$.simplify_distr(distr)
   22.                       └─mlr3proba:::.__PredictionSurv__.simplify_distr(...)
  
  [ FAIL 23 | WARN 19 | SKIP 2 | PASS 1725 ]
  Error: Test failures
  Execution halted