- using R Under development (unstable) (2025-09-04 r88794)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
clang version 21.1.0
flang version 21.1.0
- running under: Fedora Linux 42 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘mlsurvlrnrs/DESCRIPTION’ ... OK
- this is package ‘mlsurvlrnrs’ version ‘0.0.5’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘mlsurvlrnrs’ can be installed ... [12s/12s] OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking whether startup messages can be suppressed ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... ERROR
Running examples in ‘mlsurvlrnrs-Ex.R’ failed
The error most likely occurred in:
> ### Name: LearnerSurvCoxPHCox
> ### Title: R6 Class to construct a Cox proportional hazards survival
> ### learner
> ### Aliases: LearnerSurvCoxPHCox
>
> ### ** Examples
>
> # survival analysis
>
> dataset <- survival::colon |>
+ data.table::as.data.table() |>
+ na.omit()
> dataset <- dataset[get("etype") == 2, ]
>
> seed <- 123
> surv_cols <- c("status", "time", "rx")
>
> feature_cols <- colnames(dataset)[3:(ncol(dataset) - 1)]
>
> split_vector <- splitTools::multi_strata(
+ df = dataset[, .SD, .SDcols = surv_cols],
+ strategy = "kmeans",
+ k = 4
+ )
>
> train_x <- model.matrix(
+ ~ -1 + .,
+ dataset[, .SD, .SDcols = setdiff(feature_cols, surv_cols[1:2])]
+ )
> train_y <- survival::Surv(
+ event = (dataset[, get("status")] |>
+ as.character() |>
+ as.integer()),
+ time = dataset[, get("time")],
+ type = "right"
+ )
>
> fold_list <- splitTools::create_folds(
+ y = split_vector,
+ k = 3,
+ type = "stratified",
+ seed = seed
+ )
>
>
> surv_coxph_cox_optimizer <- mlexperiments::MLCrossValidation$new(
+ learner = LearnerSurvCoxPHCox$new(),
+ fold_list = fold_list,
+ ncores = 1L,
+ seed = seed
+ )
> surv_coxph_cox_optimizer$performance_metric <- c_index
>
> # set data
> surv_coxph_cox_optimizer$set_data(
+ x = train_x,
+ y = train_y
+ )
>
> surv_coxph_cox_optimizer$execute()
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'.
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [122s/405s] ERROR
Running ‘testthat.R’ [122s/405s]
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
>
> Sys.setenv("OMP_THREAD_LIMIT" = 2)
> Sys.setenv("Ncpu" = 2)
>
> 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
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 9.703 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 2.43 seconds
3) Running FUN 2 times in 2 thread(s)... 1.483 seconds
CV fold: Fold2
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 9.873 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 2.606 seconds
3) Running FUN 2 times in 2 thread(s)... 1.493 seconds
CV fold: Fold3
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 9.365 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 1.402 seconds
3) Running FUN 2 times in 2 thread(s)... 1.432 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.202 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Maximum convergence attempts exceeded - process is probably sampling random points. 112 seconds
3) Running FUN 2 times in 2 thread(s)... 0.641 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.292 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 31.118 seconds
3) Running FUN 2 times in 2 thread(s)... 0.814 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.399 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 4.91 seconds
3) Running FUN 2 times in 2 thread(s)... 0.673 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.433 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.918 seconds
3) Running FUN 2 times in 2 thread(s)... 0.557 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.36 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 1.135 seconds
3) Running FUN 2 times in 2 thread(s)... 1.036 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.618 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.936 seconds
3) Running FUN 2 times in 2 thread(s)... 0.621 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.403 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 18.456 seconds
3) Running FUN 2 times in 2 thread(s)... 0.807 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.621 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 5.441 seconds
3) Running FUN 2 times in 2 thread(s)... 0.796 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.38 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 11.006 seconds
3) Running FUN 2 times in 2 thread(s)... 0.761 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 6.81 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 6.841 seconds
3) Running FUN 2 times in 2 thread(s)... 0.465 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 6.855 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters... 14.425 seconds
3) Running FUN 2 times in 2 thread(s)... 0.639 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 6.37 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 8.252 seconds
3) Running FUN 2 times in 2 thread(s)... 0.52 seconds
[ 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: Package "measures" must be installed to use function 'metric_types_helper()'.
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(...)
── Error ('test-surv_glmnet_cox.R:99:5'): test nested cv, grid - surv_glmnet_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_glmnet_cox_optimizer$execute() at test-surv_glmnet_cox.R:99: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(...)
── Error ('test-surv_ranger_cox.R:110:5'): test nested cv, bayesian - surv_ranger_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_ranger_cox_optimizer$execute() at test-surv_ranger_cox.R:110: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(...)
── Error ('test-surv_rpart_cox.R:108:5'): test nested cv, bayesian - surv_rpart_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
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:::.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(...)
── Error ('test-surv_xgboost_aft.R:116:5'): test nested cv, bayesian - surv_xgboost_aft ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
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:::.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(...)
── Error ('test-surv_xgboost_cox.R:115:5'): test nested cv, bayesian - surv_xgboost_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
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:::.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(...)
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
Error: Test failures
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [50s/47s] OK
- checking PDF version of manual ... OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 2 ERRORs