marjoleinF / pre

an R package for deriving Prediction Rule Ensembles
58 stars 17 forks source link

`test_pre_misc.R` errors with upcoming `mice 3.16.0` #30

Closed stefvanbuuren closed 11 months ago

stefvanbuuren commented 1 year ago

I am updating to mice 3.16.0 and performed a reverse dependency check. There is a new error in the test_pre_misc.R script.

I attempted to reproduce it on my machine but gave up when I discovered that I needed several save and load operations for testing. Would you be willing to look at whether this is a mice or a pre problem?

mice:master* > revdepcheck::revdep_details(revdep = "pre")
══ Reverse dependency check ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ pre 1.0.6 ══

Status: BROKEN

── Newly failing

✖ checking tests ...

── Before ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
0 errors ✔ | 0 warnings ✔ | 0 notes ✔

── After ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ checking tests ...
  See below...

── Test failures ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── testthat ────

> library(testthat)
> library(pre)
> 
> #####
> # partykit and earth is loaded as failures of tests may be caused by the version
> # of either package. Thus, we print the sessionInfo
> 
> library(earth)
Loading required package: Formula
Loading required package: plotmo
Loading required package: plotrix
Loading required package: TeachingDemos
> library(partykit)
Loading required package: grid
Loading required package: libcoin
Loading required package: mvtnorm
> print(sessionInfo())
R version 4.3.0 (2023-04-21)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.4

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Amsterdam
tzcode source: internal

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
 [1] partykit_1.2-20    mvtnorm_1.1-3      libcoin_1.0-9      earth_5.3.2       
 [5] plotmo_3.6.2       TeachingDemos_2.12 plotrix_3.8-2      Formula_1.2-5     
 [9] pre_1.0.6          testthat_3.1.8    

loaded via a namespace (and not attached):
 [1] cli_3.6.1          rlang_1.1.1        stringi_1.7.12     MatrixModels_0.5-1
 [5] glue_1.6.2         glmnet_4.1-7       brio_1.1.3         lifecycle_1.0.3   
 [9] foreach_1.5.2      stringr_1.5.0      compiler_4.3.0     codetools_0.2-19  
[13] Rcpp_1.0.10        lattice_0.21-8     R6_2.5.1           splines_4.3.0     
[17] inum_1.0-5         shape_1.4.6        magrittr_2.0.3     rpart_4.1.19      
[21] Matrix_1.5-4.1     tools_4.3.0        iterators_1.0.14   survival_3.5-5    
> 
> test_check("pre")
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 122 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_pre_misc.R:94:3'): cvpre gives previous results with airquality data ──
Error in `serverSocket(port = port)`: creation of server socket failed: port 11471 cannot be opened
Backtrace:
    ▆
 1. └─parallel::makeCluster(2L) at test_pre_misc.R:94:2
 2.   └─parallel::makePSOCKcluster(names = spec, ...)
 3.     └─base::serverSocket(port = port)

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 122 ]
Error: Test failures
Execution halted

1 error ✖ | 0 warnings ✔ | 0 notes ✔
marjoleinF commented 1 year ago

Dear Stef,

Thanks for notifying me! Likely due to package pre. I'm currenthy updating the multiple imputation functionality. Will check this carefully and fix issues.

Best Marjolein

Op do 1 jun. 2023 13:37 schreef Stef van Buuren @.***>:

I am updating to mice 3.16.0 and performed a reverse dependency check. There is a new error in the test_pre_misc.R script.

I attempted to reproduce it on my machine but gave up when I discovered that I needed several save and load operations for testing. Would you be willing to look at whether this is a mice or a pre problem?

mice:master* > revdepcheck::revdep_details(revdep = "pre") ══ Reverse dependency check ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ pre 1.0.6 ══

Status: BROKEN

── Newly failing

✖ checking tests ...

── Before ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 0 errors ✔ | 0 warnings ✔ | 0 notes ✔

── After ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ❯ checking tests ... See below...

── Test failures ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── testthat ────

library(testthat) library(pre)

partykit and earth is loaded as failures of tests may be caused by the version

of either package. Thus, we print the sessionInfo

library(earth) Loading required package: Formula Loading required package: plotmo Loading required package: plotrix Loading required package: TeachingDemos library(partykit) Loading required package: grid Loading required package: libcoin Loading required package: mvtnorm print(sessionInfo()) R version 4.3.0 (2023-04-21) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.4

Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Amsterdam tzcode source: internal

attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base

other attached packages: [1] partykit_1.2-20 mvtnorm_1.1-3 libcoin_1.0-9 earth_5.3.2 [5] plotmo_3.6.2 TeachingDemos_2.12 plotrix_3.8-2 Formula_1.2-5 [9] pre_1.0.6 testthat_3.1.8

loaded via a namespace (and not attached): [1] cli_3.6.1 rlang_1.1.1 stringi_1.7.12 MatrixModels_0.5-1 [5] glue_1.6.2 glmnet_4.1-7 brio_1.1.3 lifecycle_1.0.3 [9] foreach_1.5.2 stringr_1.5.0 compiler_4.3.0 codetools_0.2-19 [13] Rcpp_1.0.10 lattice_0.21-8 R6_2.5.1 splines_4.3.0 [17] inum_1.0-5 shape_1.4.6 magrittr_2.0.3 rpart_4.1.19 [21] Matrix_1.5-4.1 tools_4.3.0 iterators_1.0.14 survival_3.5-5

test_check("pre") [ FAIL 1 | WARN 0 | SKIP 0 | PASS 122 ]

══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_pre_misc.R:94:3'): cvpre gives previous results with airquality data ── Error in serverSocket(port = port): creation of server socket failed: port 11471 cannot be opened Backtrace: ▆

  1. └─parallel::makeCluster(2L) at test_pre_misc.R:94:2
  2. └─parallel::makePSOCKcluster(names = spec, ...)
  3. └─base::serverSocket(port = port)

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 122 ] Error: Test failures Execution halted

1 error ✖ | 0 warnings ✔ | 0 notes ✔

— Reply to this email directly, view it on GitHub https://github.com/marjoleinF/pre/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6AHHBXSMBQDC4VJR2L56LXJB5I3ANCNFSM6AAAAAAYWZFM3Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

marjoleinF commented 11 months ago

Error seems to be due to parallel computing and should not occur on CRAN tests.