* using log directory ‘/data/gannet/ripley/R/packages/tests-Suggests/shapr.Rcheck’ * using R Under development (unstable) (2025-04-15 r88147) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) * running under: Fedora Linux 40 (Workstation Edition) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘shapr/DESCRIPTION’ ... OK * this is package ‘shapr’ version ‘1.0.3’ * 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 ‘shapr’ can be installed ... [171s/151s] OK * used C++ compiler: ‘g++ (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)’ * 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 ... [50s/172s] OK * checking Rd files ... [3s/12s] 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 line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [157s/455s] [157s/457s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > # CRAN OMP THREAD LIMIT > Sys.setenv("OMP_THREAD_LIMIT" = 1) > > library(testthat) > library(shapr) Attaching package: 'shapr' The following object is masked from 'package:testthat': setup > > test_check("shapr") Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: gaussian * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: gaussian * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Note: Feature names extracted from the model contains NA. Consistency checks between model and data is therefore disabled. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 128, and is therefore set to 2^n_features = 128. Note: Feature names extracted from the model contains NA. Consistency checks between model and data is therefore disabled. Success with message: max_n_coalitions is NULL or larger than or 2^n_groups = 4, and is therefore set to 2^n_groups = 4. * Model class: * Approach: independence * Iterative estimation: TRUE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- iterative computation started -- -- Iteration 1 ----------------------------------------------------------------- i Using 6 of 32 coalitions, 6 new. -- Iteration 2 ----------------------------------------------------------------- i Using 8 of 32 coalitions, 2 new. -- Iteration 3 ----------------------------------------------------------------- i Using 10 of 32 coalitions, 2 new. -- Iteration 4 ----------------------------------------------------------------- i Using 12 of 32 coalitions, 2 new. -- Iteration 5 ----------------------------------------------------------------- i Using 14 of 32 coalitions, 2 new. -- Iteration 6 ----------------------------------------------------------------- i Using 16 of 32 coalitions, 2 new. -- Iteration 7 ----------------------------------------------------------------- i Using 18 of 32 coalitions, 2 new. -- Iteration 8 ----------------------------------------------------------------- i Using 20 of 32 coalitions, 2 new. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: gaussian * Iterative estimation: TRUE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- iterative computation started -- -- Iteration 1 ----------------------------------------------------------------- i Using 6 of 32 coalitions, 6 new. -- Iteration 2 ----------------------------------------------------------------- i Using 10 of 32 coalitions, 4 new. -- Iteration 3 ----------------------------------------------------------------- i Using 12 of 32 coalitions, 2 new. Success with message: max_n_coalitions is NULL or larger than or 2^n_groups = 32, and is therefore set to 2^n_groups = 32. * Model class: * Approach: gaussian * Iterative estimation: TRUE * Number of group-wise Shapley values: 5 * Number of observations to explain: 3 -- iterative computation started -- -- Iteration 1 ----------------------------------------------------------------- i Using 6 of 32 coalitions, 6 new. -- Iteration 2 ----------------------------------------------------------------- i Using 10 of 32 coalitions, 4 new. -- Iteration 3 ----------------------------------------------------------------- i Using 12 of 32 coalitions, 2 new. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: ctree * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: ctree * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 10 of 32 coalitions. * Model class: * Approach: ctree * Iterative estimation: FALSE * Number of group-wise Shapley values: 3 * Number of observations to explain: 3 -- Main computation started -- i Using 6 of 8 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: gaussian * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. -- Starting `shapr::explain()` at 2025-04-16 07:32:51 -------------------------- * Model class: * Approach: gaussian * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 * Computations (temporary) saved at: '/tmp/RtmphDOE9E/working_dir/RtmpylAMAz/shapr_obj_33da591b1f3958.rds' -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: independence, empirical, gaussian, and copula * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: independence, empirical, gaussian, and copula * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: independence, empirical, gaussian, and copula * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: gaussian, gaussian, gaussian, and gaussian * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: independence, empirical, independence, and empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: independence, empirical, independence, and empirical * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_features = 32, and is therefore set to 2^n_features = 32. * Model class: * Approach: gaussian * Iterative estimation: FALSE * Number of feature-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. Success with message: max_n_coalitions is NULL or larger than or 2^n_groups = 32, and is therefore set to 2^n_groups = 32. * Model class: * Approach: gaussian * Iterative estimation: FALSE * Number of group-wise Shapley values: 5 * Number of observations to explain: 3 -- Main computation started -- i Using 32 of 32 coalitions. [ FAIL 7 | WARN 3 | SKIP 49 | PASS 28 ] ══ Skipped tests (49) ══════════════════════════════════════════════════════════ • On CRAN (47): 'test-asymmetric-causal-output.R:14:1', 'test-asymmetric-causal-setup.R:4:3', 'test-asymmetric-causal-setup.R:232:3', 'test-asymmetric-causal-setup.R:256:3', 'test-asymmetric-causal-setup.R:321:3', 'test-forecast-setup.R:5:3', 'test-forecast-setup.R:34:3', 'test-forecast-setup.R:112:3', 'test-forecast-setup.R:137:3', 'test-forecast-setup.R:164:3', 'test-forecast-setup.R:226:3', 'test-forecast-setup.R:300:3', 'test-forecast-setup.R:350:3', 'test-forecast-setup.R:446:3', 'test-forecast-setup.R:519:3', 'test-iterative-output.R:1:1', 'test-iterative-setup.R:79:3', 'test-iterative-setup.R:311:3', 'test-iterative-setup.R:396:3', 'test-regression-output.R:1:1', 'test-regression-setup.R:4:3', 'test-regression-setup.R:42:3', 'test-regression-setup.R:170:3', 'test-regression-setup.R:228:3', 'test-regression-setup.R:290:3', 'test-regression-setup.R:331:3', 'test-regular-output.R:1:1', 'test-regular-setup.R:5:3', 'test-regular-setup.R:38:3', 'test-regular-setup.R:121:3', 'test-regular-setup.R:243:3', 'test-regular-setup.R:262:3', 'test-regular-setup.R:320:3', 'test-regular-setup.R:397:3', 'test-regular-setup.R:558:3', 'test-regular-setup.R:681:3', 'test-regular-setup.R:797:3', 'test-regular-setup.R:818:3', 'test-regular-setup.R:876:3', 'test-regular-setup.R:934:3', 'test-regular-setup.R:1040:3', 'test-regular-setup.R:1152:3', 'test-regular-setup.R:1224:3', 'test-regular-setup.R:1268:3', 'test-regular-setup.R:1408:3', 'test-regular-setup.R:1784:3', 'test-regular-setup.R:1820:3' • {forecast} is not installed (1): 'test-forecast-output.R:1:1' • {ggplot2} is not installed (1): 'test-plot.R:1:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-forecast-setup.R:595:3'): ARIMA gives the same output with different horizons ── Error in `test_predict_model(x_test = head(internal$data$x_train, 2), predict_model = predict_model, model = model, internal = internal)`: The predict_model function of class `Arima` is invalid. See the 'Advanced usage' section of the vignette: vignette('general_usage', package = 'shapr') for more information on running shapr with custom models. A basic function test threw the following error: Error in predict_model(x = model, newdata = x_test[, .SD, .SDcols = seq_len(internal$data$n_endo), : The forecast package is required when explaining Arima models Backtrace: ▆ 1. └─shapr::explain_forecast(...) at test-forecast-setup.R:595:3 2. └─shapr:::test_predict_model(...) ── Error ('test-forecast-setup.R:669:3'): ARIMA gives the same output with different horizons with grouping ── Error in `test_predict_model(x_test = head(internal$data$x_train, 2), predict_model = predict_model, model = model, internal = internal)`: The predict_model function of class `Arima` is invalid. See the 'Advanced usage' section of the vignette: vignette('general_usage', package = 'shapr') for more information on running shapr with custom models. A basic function test threw the following error: Error in predict_model(x = model, newdata = x_test[, .SD, .SDcols = seq_len(internal$data$n_endo), : The forecast package is required when explaining Arima models Backtrace: ▆ 1. └─shapr::explain_forecast(...) at test-forecast-setup.R:669:3 2. └─shapr:::test_predict_model(...) ── Error ('test-iterative-setup.R:223:3'): different n_batches gives same/different shapley values for different approaches ── Error in `loadNamespace(x)`: there is no package called 'partykit' Backtrace: ▆ 1. └─shapr::explain(...) at test-iterative-setup.R:223:3 2. └─shapr::compute_vS(internal, model, predict_model) 3. └─shapr:::future_compute_vS_batch(...) 4. └─future.apply::future_lapply(...) 5. └─future.apply:::future_xapply(...) 6. ├─future::value(fs) 7. └─future:::value.list(fs) ── Error ('test-regular-setup.R:1207:3'): Correct dimension of S when sampling combinations ── Error in `loadNamespace(x)`: there is no package called 'partykit' Backtrace: ▆ 1. └─shapr::explain(...) at test-regular-setup.R:1207:3 2. └─shapr::compute_vS(internal, model, predict_model) 3. └─shapr:::future_compute_vS_batch(...) 4. └─future.apply::future_lapply(...) 5. └─future.apply:::future_xapply(...) 6. ├─future::value(fs) 7. └─future:::value.list(fs) ── Error ('test-regular-setup.R:1347:3'): Correct dimension of S when sampling combinations with groups ── Error in `loadNamespace(x)`: there is no package called 'partykit' Backtrace: ▆ 1. └─shapr::explain(...) at test-regular-setup.R:1347:3 2. └─shapr::compute_vS(internal, model, predict_model) 3. └─shapr:::future_compute_vS_batch(...) 4. └─future.apply::future_lapply(...) 5. └─future.apply:::future_xapply(...) 6. ├─future::value(fs) 7. └─future:::value.list(fs) ── Error ('test-regular-setup.R:1622:3'): vaeac_set_seed_works ───────────────── Error in `loadNamespace(x)`: there is no package called 'torch' Backtrace: ▆ 1. ├─testthat::skip_if_not(torch::torch_is_installed()) at test-regular-setup.R:1622:3 2. │ └─base::isTRUE(condition) 3. └─base::loadNamespace(x) 4. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 5. └─base (local) withOneRestart(expr, restarts[[1L]]) 6. └─base (local) doWithOneRestart(return(expr), restart) ── Error ('test-regular-setup.R:1663:3'): vaeac_pretreained_vaeac_model ──────── Error in `loadNamespace(x)`: there is no package called 'torch' Backtrace: ▆ 1. ├─testthat::skip_if_not(torch::torch_is_installed()) at test-regular-setup.R:1663:3 2. │ └─base::isTRUE(condition) 3. └─base::loadNamespace(x) 4. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 5. └─base (local) withOneRestart(expr, restarts[[1L]]) 6. └─base (local) doWithOneRestart(return(expr), restart) [ FAIL 7 | WARN 3 | SKIP 49 | PASS 28 ] Error: Test failures In addition: Warning message: In eval(exprs, env) : The forecast package is required for testing explain_forecast() Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [3s/12s] OK * checking PDF version of manual ... [27s/108s] OK * checking HTML version of manual ... [14s/46s] OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR See ‘/data/gannet/ripley/R/packages/tests-Suggests/shapr.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 18:54.23, 462.67 + 23.68