tdhock / mlr3resampling

Resampling algorithms for mlr3 framework in R
3 stars 1 forks source link

Upcoming mlr3 0.21.0 #14

Closed be-marc closed 2 weeks ago

be-marc commented 2 weeks ago

Hey, we will release a new mlr3 version soon. Currently, we get with mlr-org/mlr3@encapsulate (next main):

* using log directory ‘/home/ubuntu/mlr3/revdep/checks/mlr3resampling/new/mlr3resampling.Rcheck’
* using R version 4.3.1 (2023-06-16)
* using platform: x86_64-pc-linux-gnu (64-bit)
* R was compiled by
    gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
    GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
* running under: Ubuntu 20.04.6 LTS
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘mlr3resampling/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘mlr3resampling’ version ‘2024.7.7’
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Package suggested but not available for checking: ‘mlr3tuning’
* 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 ‘mlr3resampling’ can be installed ... OK
* 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 R 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 startup messages can be suppressed ... 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 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 contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... ERROR
Running examples in ‘mlr3resampling-Ex.R’ failed
The error most likely occurred in:

> ### Name: AZtrees
> ### Title: Arizona Trees
> ### Aliases: AZtrees
> ### Keywords: datasets
> 
> ### ** Examples
> 
> 
> data(AZtrees)
> task.obj <- mlr3::TaskClassif$new("AZtrees3", AZtrees, target="y")
> task.obj$col_roles$feature <- grep("SAMPLE", names(AZtrees), value=TRUE)
> task.obj$col_roles$group <- "polygon"
> task.obj$col_roles$subset <- "region3"
Error in .__Task__col_roles(self = self, private = private, super = super,  : 
  Assertion on 'names of col_roles' failed: Names must be a permutation of set {'feature','target','name','order','stratum','group','weight'}, but has extra elements {'subset'}.
Calls: <Anonymous> ... .__Task__col_roles -> assert_names -> makeAssertion -> mstop
Execution halted
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ... ERROR
  Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
   5.         └─checkmate:::mstop(...)
  ── Error ('test-CRAN.R:382:3'): ResamplingSameOtherSizesCV yes subset, yes group, yes stratum, sizes=2 ──
  Error in `.__Task__col_roles(self = self, private = private, super = super, 
      rhs = rhs)`: Assertion on 'names of col_roles' failed: Names must be a permutation of set {'feature','target','name','order','stratum','group','weight'}, but has extra elements {'subset'}.
  Backtrace:
      ▆
   1. └─mlr3 (local) `<fn>`(base::quote(`<named list>`)) at test-CRAN.R:382:3
   2.   └─mlr3:::.__Task__col_roles(...)
   3.     └─checkmate::assert_names(...)
   4.       └─checkmate::makeAssertion(x, res, .var.name, add)
   5.         └─checkmate:::mstop(...)

  [ FAIL 12 | WARN 0 | SKIP 0 | PASS 43 ]
  Error: Test failures
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... ERROR
Errors in running code in vignettes:
when running code in ‘Newer_resamplers.Rmd’
  ...
   A    B    C 
 300  600 1200 

> reg.task <- mlr3::TaskRegr$new("sin", task.dt, target = "y")

> reg.task$col_roles$subset <- "random_group"

  When sourcing ‘Newer_resamplers.R’:
Error: Assertion on 'names of col_roles' failed: Names must be a permutation of set {'feature','target','name','order','stratum','group','weight'}, but has extra elements {'subset'}.
Execution halted
when running code in ‘Older_resamplers.Rmd’
  ...
> reg.task.list <- list()

> for (task_id in names(reg.pattern.list)) {
+     f <- reg.pattern.list[[task_id]]
+     yname <- paste0("y_", task_id)
+     reg.dt[, `:=`((yname),  .... [TRUNCATED] 

  When sourcing ‘Older_resamplers.R’:
Error: Assertion on 'names of col_roles' failed: Names must be a permutation of set {'feature','target','name','order','stratum','group','weight'}, but has extra elements {'subset'}.
Execution halted

  ‘Newer_resamplers.Rmd’... failed
  ‘Older_resamplers.Rmd’... failed
* checking re-building of vignette outputs ... SKIPPED
* DONE
Status: 3 ERRORs, 1 NOTE

Regarding your comment in https://github.com/mlr-org/mlr3/issues/1040. We agree that you change mlr_reflections.

tdhock commented 1 week ago

an update is now on CRAN