Running ‘testthat.R’ [12s/28s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > data.table::setDTthreads(1L)
  > if(require(testthat))test_check("mlr3resampling")
  Loading required package: testthat
  Loading required package: mlr3resampling
  Saving _problems/test-CRAN-20.R
  Saving _problems/test-CRAN-30.R
  Saving _problems/test-CRAN-200.R
  Saving _problems/test-CRAN-218.R
  Saving _problems/test-CRAN-244.R
  Saving _problems/test-CRAN-272.R
  Saving _problems/test-CRAN-299.R
  Saving _problems/test-CRAN-325.R
  Saving _problems/test-CRAN-351.R
  Saving _problems/test-CRAN-380.R
  Saving _problems/test-CRAN-400.R
  Saving _problems/test-CRAN-420.R
  Saving _problems/test-CRAN-442.R
  Saving _problems/test-CRAN-636.R
  Saving _problems/test-CRAN-701.R
  Saving _problems/test-CRAN-744.R
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 53 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-CRAN.R:18:3'): resampling error if no strata ─────────────────
  `{ ... }` threw an error with unexpected message.
  Expected match: "task has no strata, but at least one stratum variable is required; at least assign the subset variable to a stratum"
  Actual message: "attempt access index 1/1 in VECTOR_ELT"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-CRAN.R:18:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─same_other$instantiate(itask) at test-CRAN.R:19:5
    7.   └─mlr3:::.__Resampling__instantiate(...)
    8.     └─private$.get_instance(task)
    9.       └─mlr3resampling:::.__ResamplingSameOtherCV__.get_instance(...)
   10.         ├─task$data(cols = subset.name.vec)[, `:=`(subset, .GRP), by = subset.name.vec]
   11.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:30:3'): instantiation creates instance ──────────────────
  Error in ``[.data.table`(task$data(cols = subset.name.vec), , `:=`(subset, .GRP), by = subset.name.vec)`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other$instantiate(itask) at test-CRAN.R:30:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherCV__.get_instance(...)
   5.         ├─task$data(cols = subset.name.vec)[, `:=`(subset, .GRP), by = subset.name.vec]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:200:3'): ResamplingSameOtherSizesCV no subset, no group, no stratum ──
  Error in ``[.data.table`(unique(fold.train.dt[, .(group, stratum)])[sample(.N)], , `:=`(groups, max(n.train.groups.vec) * seq_along(group)/length(group)), by = stratum)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:200:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:218:3'): ResamplingSameOtherSizesCV no subset, yes group, no stratum ──
  Error in ``[.data.table`(unique(fold.train.dt[, .(group, stratum)])[sample(.N)], , `:=`(groups, max(n.train.groups.vec) * seq_along(group)/length(group)), by = stratum)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:218:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:244:3'): ResamplingSameOtherSizesCV no subset, yes group, yes stratum ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:244:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:272:3'): ResamplingSameOtherSizesCV yes subset, yes group, yes stratum, ignore_subset ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:272:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:299:3'): ResamplingSameOtherSizesCV no subset, yes group, yes stratum, sizes=0 ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:299:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:325:3'): ResamplingSameOtherSizesCV no subset, yes group, yes stratum, sizes=1 ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:325:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:351:3'): ResamplingSameOtherSizesCV yes subset, yes group, yes stratum ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:351:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:380:3'): ResamplingSameOtherSizesCV yes subset, yes group, yes stratum, sizes=0 ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:380:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:400:3'): ResamplingSameOtherSizesCV yes subset, yes group, yes stratum, sizes=1 ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:400:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:420:3'): ResamplingSameOtherSizesCV yes subset, yes group, yes stratum, sizes=2 ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:420:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:442:3'): ResamplingSameOtherSizesCV yes subset, yes group, yes stratum, sizes=2, same/other ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─same_other_sizes_cv$instantiate(reg.task) at test-CRAN.R:442:3
   2.   └─mlr3:::.__Resampling__instantiate(...)
   3.     └─private$.get_instance(task)
   4.       └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:636:3'): proj_test down-samples proportionally ──────────
  Error in ``[.data.table`(strat_dt, , `:=`(..strat.i, 1:.N), by = stratum)`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mlr3resampling::proj_test(pkg.proj.dir) at test-CRAN.R:636:3
   2.   ├─strat_dt[, `:=`(..strat.i, 1:.N), by = stratum]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:698:3'): set works after score(), other is last Y level ──
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─mlr3::benchmark_grid(reg.task.list, reg.learner.list, SOAK) at test-CRAN.R:698:3
    2.   └─mlr3misc::pmap(grid, function(task, resampling) resamplings[[resampling]]$clone()$instantiate(tasks[[task]]))
    3.     └─mlr3misc:::mapply_list(.f, .x, list(...))
    4.       └─base::.mapply(.f, .dots, .args)
    5.         └─mlr3 (local) `<fn>`(task = dots[[1L]][[1L]], resampling = dots[[2L]][[1L]])
    6.           └─resamplings[[resampling]]$clone()$instantiate(tasks[[task]])
    7.             └─mlr3:::.__Resampling__instantiate(...)
    8.               └─private$.get_instance(task)
    9.                 └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   10.                   ├─...[]
   11.                   └─data.table:::`[.data.table`(...)
  ── Error ('test-CRAN.R:741:3'): plot ok without other ──────────────────────────
  Error in ``[.data.table`(task$data(cols = task$col_roles$stratum), , `:=`(stratum, .GRP), by = c(task$col_roles$stratum))`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─mlr3::benchmark_grid(reg.task.list, reg.learner.list, SAK) at test-CRAN.R:741:3
    2.   └─mlr3misc::pmap(grid, function(task, resampling) resamplings[[resampling]]$clone()$instantiate(tasks[[task]]))
    3.     └─mlr3misc:::mapply_list(.f, .x, list(...))
    4.       └─base::.mapply(.f, .dots, .args)
    5.         └─mlr3 (local) `<fn>`(task = dots[[1L]][[1L]], resampling = dots[[2L]][[1L]])
    6.           └─resamplings[[resampling]]$clone()$instantiate(tasks[[task]])
    7.             └─mlr3:::.__Resampling__instantiate(...)
    8.               └─private$.get_instance(task)
    9.                 └─mlr3resampling:::.__ResamplingSameOtherSizesCV__.get_instance(...)
   10.                   ├─...[]
   11.                   └─data.table:::`[.data.table`(...)
  
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 53 ]
  Error:
  ! Test failures.
  Execution halted