yqzhong7 / AIPW

R Package: Augmented Inverse Probability Weighted (AIPW) Estimation for Average Causal Effect
https://yqzhong7.github.io/AIPW/
GNU General Public License v3.0
21 stars 8 forks source link

2 tests fail on PowerPC: `Error in `is.nan(A)`: default method not implemented for type 'list'`; `Error in `trim_logit(X)`: 'list' object cannot be coerced to type 'double'` #41

Closed barracuda156 closed 11 months ago

barracuda156 commented 11 months ago

@yqzhong7 Could this be addressed, please?

R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library(testthat)
> library(AIPW)
> 
> test_check("AIPW")
[ FAIL 2 | WARN 0 | SKIP 0 | PASS 206 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-stratified_fit.R:75:3'): AIPW stratified_fit: sl3 & k_split ────
Error in `is.nan(A)`: default method not implemented for type 'list'
Backtrace:
     ▆
  1. └─aipw$stratified_fit() at test-stratified_fit.R:75:3
  2.   └─private$.f_lapply(...)
  3.     └─future.apply::future_lapply(...)
  4.       └─future.apply:::future_xapply(...)
  5.         ├─future::value(fs)
  6.         └─future:::value.list(fs)
  7.           ├─future::resolve(...)
  8.           └─future:::resolve.list(...)
  9.             └─future (local) signalConditionsASAP(obj, resignal = FALSE, pos = ii)
 10.               └─future:::signalConditions(...)
── Error ('test-tmle_support.R:53:3'): AIPW_tmle class: tmle3 ──────────────────
Error in `trim_logit(X)`: 'list' object cannot be coerced to type 'double'
Backtrace:
    ▆
 1. └─tmle3::tmle3(or_spec, data = df, node_list, learner_list) at test-tmle_support.R:53:3
 2.   └─tmle_spec$make_initial_likelihood(tmle_task, learner_list)
 3.     └─tmle3::point_tx_likelihood(tmle_task, learner_list)
 4.       └─likelihood_def$train(tmle_task)
 5.         └─delayed_fit$compute(job_type = sl3_delayed_job_type(), progress = verbose)
 6.           └─scheduler$compute()
 7.             └─self$compute_step()

[ FAIL 2 | WARN 0 | SKIP 0 | PASS 206 ]
Error: Test failures
Execution halted
yqzhong7 commented 11 months ago

Thank you for reporting! I've removed tmle3 and sl3 supports. These problems should be addressed with the new version #42

barracuda156 commented 11 months ago

@yqzhong7 Thank you, I will try it.

barracuda156 commented 11 months ago

I can confirm that tests pass now:

--->  Testing R-AIPW
* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-AIPW/R-AIPW/work/AIPW-a3ae8ef59dfe205b157cd7e3a5e3e93abe063fab/AIPW.Rcheck’
* using R version 4.3.2 (2023-10-31)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.2.0_3) 13.2.0
    GNU Fortran (MacPorts gcc12 12.3.0_0) 12.3.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using option ‘--ignore-vignettes’
* checking for file ‘AIPW/DESCRIPTION’ ... OK
* this is package ‘AIPW’ version ‘0.6.9’
* 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 ‘AIPW’ can be installed ... OK
* checking installed package size ... OK
* checking package 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 dependencies in R code ... NOTE
Namespaces in Imports field not imported from:
  ‘Rsolnp’ ‘SuperLearner’ ‘future.apply’ ‘ggplot2’ ‘progressr’ ‘stats’
  ‘utils’
  All declared Imports should be used.
* 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 LazyData ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking files in ‘vignettes’ ... SKIPPED
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 OK
* checking PDF version of manual ... OK
* DONE