Running ‘testthat.R’ [4s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(mlsurvlrnrs)
  > 
  > test_check("mlsurvlrnrs")
  
  CV fold: Fold1
  Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
  
  CV fold: Fold2
  Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
  
  CV fold: Fold3
  Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
  
  CV fold: Fold1
  
  Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
  ... reducing initialization grid to 10 rows.
  
  CV fold: Fold1
  
  Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
  ... reducing initialization grid to 10 rows.
  
  CV fold: Fold1
  
  Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
  ... reducing initialization grid to 10 rows.
  [ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-lints.R:10:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-surv_coxph_cox.R:56:5'): test cv - surv_coxph_cox ──────────────
  Error in `mlr3measures::measures[[fun_name]]`: wrong arguments for subsetting an environment
  Backtrace:
       ▆
    1. └─surv_coxph_cox_optimizer$execute() at test-surv_coxph_cox.R:56:5
    2.   └─mlexperiments:::.run_cv(self = self, private = private)
    3.     └─mlexperiments:::.cv_postprocessing(...)
    4.       └─mlexperiments:::.compute_performance(...)
    5.         └─base::sapply(...)
    6.           └─base::lapply(X = X, FUN = FUN, ...)
    7.             └─mlexperiments (local) FUN(X[[i]], ...)
    8.               └─mlexperiments::metric_types_helper(...)
    9.                 └─base::tryCatch(...)
   10.                   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   11.                     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   12.                       └─value[[3L]](cond)
  ── Error ('test-surv_glmnet_cox.R:76:5'): test nested cv, grid - surv_glmnet_cox ──
  Error: Package "glmnet" must be installed to use 'learner = "LearnerSurvGlmnetCox"'.
  Backtrace:
      ▆
   1. ├─mlexperiments::MLNestedCV$new(...) at test-surv_glmnet_cox.R:76:5
   2. │ └─mlexperiments (local) initialize(...)
   3. │   └─super$initialize(...)
   4. │     └─super$initialize(learner = learner, seed = seed, ncores = ncores)
   5. │       ├─base::stopifnot(...)
   6. │       └─R6::is.R6(learner)
   7. └─LearnerSurvGlmnetCox$new()
   8.   └─mlsurvlrnrs (local) initialize(...)
  ── Error ('test-surv_ranger_cox.R:87:5'): test nested cv, bayesian - surv_ranger_cox ──
  Error: Package "ranger" must be installed to use 'learner = "LearnerSurvRangerCox"'.
  Backtrace:
      ▆
   1. ├─mlexperiments::MLNestedCV$new(...) at test-surv_ranger_cox.R:87:5
   2. │ └─mlexperiments (local) initialize(...)
   3. │   └─super$initialize(...)
   4. │     └─super$initialize(learner = learner, seed = seed, ncores = ncores)
   5. │       ├─base::stopifnot(...)
   6. │       └─R6::is.R6(learner)
   7. └─LearnerSurvRangerCox$new()
   8.   └─mlsurvlrnrs (local) initialize(...)
  ── Error ('test-surv_rpart_cox.R:108:5'): test nested cv, bayesian - surv_rpart_cox ──
  Error: Package "ParBayesianOptimization" must be installed to use 'strategy = "bayesian"'.
  Backtrace:
       ▆
    1. └─surv_rpart_cox_optimizer$execute() at test-surv_rpart_cox.R:108:5
    2.   └─mlexperiments:::.run_cv(self = self, private = private)
    3.     └─mlexperiments:::.fold_looper(self, private)
    4.       ├─base::do.call(private$cv_run_model, run_args)
    5.       └─mlexperiments (local) `<fn>`(train_index = `<int>`, fold_train = `<named list>`, fold_test = `<named list>`)
    6.         ├─base::do.call(.cv_run_nested_model, args)
    7.         └─mlexperiments (local) `<fn>`(...)
    8.           └─hparam_tuner$execute(k = self$k_tuning)
    9.             └─private$select_optimizer(self, private)
   10.               └─BayesianOptimizer$new(...)
   11.                 └─mlexperiments (local) initialize(...)
  ── Error ('test-surv_xgboost_aft.R:116:5'): test nested cv, bayesian - surv_xgboost_aft ──
  Error: Package "ParBayesianOptimization" must be installed to use 'strategy = "bayesian"'.
  Backtrace:
       ▆
    1. └─surv_xgboost_aft_optimizer$execute() at test-surv_xgboost_aft.R:116:5
    2.   └─mlexperiments:::.run_cv(self = self, private = private)
    3.     └─mlexperiments:::.fold_looper(self, private)
    4.       ├─base::do.call(private$cv_run_model, run_args)
    5.       └─mlexperiments (local) `<fn>`(train_index = `<int>`, fold_train = `<named list>`, fold_test = `<named list>`)
    6.         ├─base::do.call(.cv_run_nested_model, args)
    7.         └─mlexperiments (local) `<fn>`(...)
    8.           └─hparam_tuner$execute(k = self$k_tuning)
    9.             └─private$select_optimizer(self, private)
   10.               └─BayesianOptimizer$new(...)
   11.                 └─mlexperiments (local) initialize(...)
  ── Error ('test-surv_xgboost_cox.R:115:5'): test nested cv, bayesian - surv_xgboost_cox ──
  Error: Package "ParBayesianOptimization" must be installed to use 'strategy = "bayesian"'.
  Backtrace:
       ▆
    1. └─surv_xgboost_cox_optimizer$execute() at test-surv_xgboost_cox.R:115:5
    2.   └─mlexperiments:::.run_cv(self = self, private = private)
    3.     └─mlexperiments:::.fold_looper(self, private)
    4.       ├─base::do.call(private$cv_run_model, run_args)
    5.       └─mlexperiments (local) `<fn>`(train_index = `<int>`, fold_train = `<named list>`, fold_test = `<named list>`)
    6.         ├─base::do.call(.cv_run_nested_model, args)
    7.         └─mlexperiments (local) `<fn>`(...)
    8.           └─hparam_tuner$execute(k = self$k_tuning)
    9.             └─private$select_optimizer(self, private)
   10.               └─BayesianOptimizer$new(...)
   11.                 └─mlexperiments (local) initialize(...)
  
  [ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
  Error: Test failures
  Execution halted