- using R version 4.5.2 Patched (2026-01-31 r89382)
- using platform: aarch64-apple-darwin20
- R was compiled by
Apple clang version 16.0.0 (clang-1600.0.26.6)
GNU Fortran (GCC) 14.2.0
- running under: macOS Ventura 13.7.8
- using session charset: UTF-8
- checking for file ‘missSBM/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘missSBM’ version ‘1.1.0’
- 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 ‘missSBM’ can be installed ... [18s/13s] OK
See the install log for details.
- used C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
- used SDK: ‘MacOSX11.3.1.sdk’
- checking installed package size ... INFO
installed size is 6.9Mb
sub-directories of 1Mb or more:
libs 4.6Mb
- 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 ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] 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 ... [3s/3s] OK
- checking Rd files ... [0s/0s] 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 ... [1s/1s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... 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 compiled code ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [7s/4s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [37s/30s] ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/30s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
Traceback:
1:
dispatcher(membership_name, membership_init$to_cc(), model_name, 13: .self$network_to_cc(), TRUE)
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 2: verbose = (verbosity > 4))
FUN(X[[i]], ...)14:
.self$do_with_inits(inits, Q, reinitialization_effort) 3:
lapply(X = S, FUN = FUN, ...)15: .self$estim_ascend(reinitialization_effort, changing_effort)
4: doTryCatch(return(expr), name, parentenv, handler)16:
private$BMobject$estimate() 5:
17: tryCatchOne(expr, names, parentenv, handlers[[1L]])mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env) 6:
tryCatchList(expr, classes, parentenv, handlers)19: eval(code, test_env)
7:
20: tryCatch(expr, error = function(e) {withCallingHandlers({ call <- conditionCall(e) if (!is.null(call)) { eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (identical(call[[1L]], quote(doTryCatch))) if (snapshot_skipped) { call <- sys.call(-4L) skip("On CRAN") dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") } else if (!new_expectations && skip_on_empty) { LONG <- 75L skip_empty() sm <- strsplit(conditionMessage(e), "\n")[[1L]] }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") skip(paste0("{", e$package, "} is not installed.")) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], }}, snapshot_on_cran = function(cnd) { type = "b") if (w > LONG) snapshot_skipped <<- TRUE prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, msg <- paste0(prefix, conditionMessage(e), "\n") error = handle_error, interrupt = handle_interrupt)
.Internal(seterrmessage(msg[1L]))21: if (!silent && isTRUE(getOption("show.error.messages"))) {doTryCatch(return(expr), name, parentenv, handler)
cat(msg, file = outFile)22: .Internal(printDeferredWarnings())tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
invisible(structure(msg, class = "try-error", condition = e))23: })
tryCatchList(expr, classes, parentenv, handlers) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)24:
tryCatch(withCallingHandlers({ 9: eval(code, test_env)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {10: skip("On CRAN")FUN(X[[i]], ...) }
else if (!new_expectations && skip_on_empty) {11: skip_empty()lapply(seq_len(cores), inner.do) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {12: if (on_cran()) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, skip(paste0("{", e$package, "} is not installed.")) mc.silent = TRUE) }
}, snapshot_on_cran = function(cnd) {13: snapshot_skipped <<- TRUEparallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, invokeRestart("muffle_cran_snapshot") verbose = (verbosity > 4))}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)14:
.self$do_with_inits(inits, Q, reinitialization_effort)25:
doWithOneRestart(return(expr), restart)15:
.self$estim_ascend(reinitialization_effort, changing_effort)26:
withOneRestart(expr, restarts[[1L]])16:
private$BMobject$estimate()27:
withRestarts(tryCatch(withCallingHandlers({17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {18: skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {19: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {20: if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) }}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), else if (!new_expectations && skip_on_empty) { end_test = function() { skip_empty() }) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {28: if (on_cran()) {test_code(code, parent.frame()) skip(paste0("{", e$package, "} is not installed."))
}29: }, snapshot_on_cran = function(cnd) {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", snapshot_skipped <<- TRUE { invokeRestart("muffle_cran_snapshot") sampler_undirected_cov$rNetwork(store = TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, error = handle_error, interrupt = handle_interrupt) "bernoulli", FALSE, covarList = covarList_undirected)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 21: plot = FALSE))doTryCatch(return(expr), name, parentenv, handler) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, 22: covariates = covarList_undirected)tryCatchOne(expr, names, parentenv, handlers[[1L]]) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]]23: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, tryCatchList(expr, classes, parentenv, handlers) clusterInit = cl, covarList = covarList_undirected)
mySBM_missSBM$doVEM()24: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatch(withCallingHandlers({ 0.05) eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 0.8) skip("On CRAN") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01) else if (!new_expectations && skip_on_empty) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), skip_empty() 0.1) } expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.1) if (on_cran()) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), skip(paste0("{", e$package, "} is not installed.")) 0.85) } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE30: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)31:
eval(code, test_env)25:
doWithOneRestart(return(expr), restart)32:
withCallingHandlers({26: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {27: skip("On CRAN")withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE33: invokeRestart("muffle_cran_snapshot")doTryCatch(return(expr), name, parentenv, handler)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 34: end_test = function() {tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
35: 28: tryCatchList(expr, classes, parentenv, handlers)test_code(code, parent.frame())
36: 29: tryCatch(withCallingHandlers({test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", eval(code, test_env) { new_expectations <- the$test_expectations > starting_expectations sampler_undirected_cov$rNetwork(store = TRUE) if (snapshot_skipped) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, skip("On CRAN") "bernoulli", FALSE, covarList = covarList_undirected) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, else if (!new_expectations && skip_on_empty) { plot = FALSE)) skip_empty() mySBM_sbm$setModel(Q) } net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { covariates = covarList_undirected) if (on_cran()) { cls <- net$clustering(1:(2 * Q)) skip(paste0("{", e$package, "} is not installed.")) cl <- cls[[Q]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, }, snapshot_on_cran = function(cnd) { clusterInit = cl, covarList = covarList_undirected) snapshot_skipped <<- TRUE mySBM_missSBM$doVEM() invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.05) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)37: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), doWithOneRestart(return(expr), restart) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 38: 0.1)withOneRestart(expr, restarts[[1L]]) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam),
0.1)39: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), withRestarts(tryCatch(withCallingHandlers({ 0.85) eval(code, test_env) }) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {30: skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {31: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {32: if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip_empty() end_test = function() { } })}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {40: skip(paste0("{", e$package, "} is not installed."))test_code(code = exprs, env = env, reporter = get_reporter() %||% } StopReporter$new())}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE41: invokeRestart("muffle_cran_snapshot")source_file(path, env = env(env), desc = desc, shuffle = shuffle, }, skip = handle_skip, warning = handle_warning, message = handle_message, error_call = error_call) error = handle_error, interrupt = handle_interrupt)
42: 33: FUN(X[[i]], ...)doTryCatch(return(expr), name, parentenv, handler)
43: 34: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error_call = error_call)
35: 44: tryCatchList(expr, classes, parentenv, handlers)doTryCatch(return(expr), name, parentenv, handler)
36: 45: tryCatch(withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations46: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN")
}47: else if (!new_expectations && skip_on_empty) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip_empty() cat(conditionMessage(cnd), "\n") } NULL}, expectation = handle_expectation, packageNotFoundError = function(e) {}) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))48: }with_reporter(reporters$multi, lapply(test_paths, test_one_file, }, snapshot_on_cran = function(cnd) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")49: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_files_serial(test_dir = test_dir, test_package = test_package, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 37: desc = desc, load_package = load_package, shuffle = shuffle, doWithOneRestart(return(expr), restart) error_call = error_call)
38: 50: withOneRestart(expr, restarts[[1L]])test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 39: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, withRestarts(tryCatch(withCallingHandlers({ load_package = load_package, parallel = parallel, shuffle = shuffle) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations51: if (snapshot_skipped) {test_dir("testthat", package = package, reporter = reporter, skip("On CRAN") ..., load_package = "installed") }
else if (!new_expectations && skip_on_empty) {52: skip_empty()test_check("missSBM") }
}, expectation = handle_expectation, packageNotFoundError = function(e) {An irrecoverable exception occurred. R is aborting now ...
if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12:
Traceback:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 1: mc.silent = TRUE)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 2: verbose = (verbosity > 4))FUN(X[[i]], ...)
14: 3: .self$do_with_inits(inits, Q, reinitialization_effort)lapply(X = S, FUN = FUN, ...)
15: 4: .self$estim_ascend(reinitialization_effort, changing_effort)doTryCatch(return(expr), name, parentenv, handler)
16: 5: private$BMobject$estimate()tryCatchOne(expr, names, parentenv, handlers[[1L]])
17: 6: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))tryCatchList(expr, classes, parentenv, handlers)
18: 7: eval(code, test_env)tryCatch(expr, error = function(e) {
call <- conditionCall(e)19: if (!is.null(call)) {eval(code, test_env) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)20: dcall <- deparse(call, nlines = 1L)withCallingHandlers({ prefix <- paste("Error in", dcall, ": ") eval(code, test_env) LONG <- 75L new_expectations <- the$test_expectations > starting_expectations sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (snapshot_skipped) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") skip("On CRAN") if (is.na(w)) } w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], else if (!new_expectations && skip_on_empty) { type = "b") skip_empty() if (w > LONG) } prefix <- paste0(prefix, "\n ")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else prefix <- "Error : " skip(paste0("{", e$package, "} is not installed.")) msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L]))}, snapshot_on_cran = function(cnd) { if (!silent && isTRUE(getOption("show.error.messages"))) { snapshot_skipped <<- TRUE cat(msg, file = outFile) invokeRestart("muffle_cran_snapshot") .Internal(printDeferredWarnings())}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt) invisible(structure(msg, class = "try-error", condition = e))
})21:
doTryCatch(return(expr), name, parentenv, handler) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))23:
tryCatchList(expr, classes, parentenv, handlers)10:
FUN(X[[i]], ...)24:
tryCatch(withCallingHandlers({11: eval(code, test_env)lapply(seq_len(cores), inner.do) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {12: skip("On CRAN")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, } mc.silent = TRUE) else if (!new_expectations && skip_on_empty) {
skip_empty()13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, }, expectation = handle_expectation, packageNotFoundError = function(e) { verbose = (verbosity > 4)) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))14: }.self$do_with_inits(inits, Q, reinitialization_effort)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE15: invokeRestart("muffle_cran_snapshot").self$estim_ascend(reinitialization_effort, changing_effort)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)16:
private$BMobject$estimate()25:
doWithOneRestart(return(expr), restart)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))26:
withOneRestart(expr, restarts[[1L]])18:
eval(code, test_env)27:
withRestarts(tryCatch(withCallingHandlers({19: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {20: skip("On CRAN")withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, snapshot_on_cran = function(cnd) { end_test = function() { snapshot_skipped <<- TRUE }) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 28: error = handle_error, interrupt = handle_interrupt)test_code(code, parent.frame())
21: 29: doTryCatch(return(expr), name, parentenv, handler)test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate",
{22: sampler_directed_cov$rNetwork(store = TRUE)tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData,
"bernoulli", TRUE, covarList = covarList_directed)23: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, tryCatchList(expr, classes, parentenv, handlers) plot = FALSE))
mySBM_sbm$setModel(Q)24: net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, tryCatch(withCallingHandlers({ covariates = covarList_directed) eval(code, test_env) cls <- net$clustering(1:(2 * Q)) new_expectations <- the$test_expectations > starting_expectations cl <- cls[[Q]] if (snapshot_skipped) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, skip("On CRAN") clusterInit = cl, covarList = covarList_directed) } mySBM_missSBM$doVEM(trace = TRUE) else if (!new_expectations && skip_on_empty) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip_empty() 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.8) if (on_cran()) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), skip(paste0("{", e$package, "} is not installed.")) 0.05) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), }, snapshot_on_cran = function(cnd) { 0.1) snapshot_skipped <<- TRUE expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), invokeRestart("muffle_cran_snapshot") 0.85)}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
30: 25: eval(code, test_env)doWithOneRestart(return(expr), restart)
31: 26: eval(code, test_env)withOneRestart(expr, restarts[[1L]])
32: 27: withCallingHandlers({withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), error = handle_error, interrupt = handle_interrupt) end_test = function() {
})33:
doTryCatch(return(expr), name, parentenv, handler)28:
test_code(code, parent.frame())34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 35: {tryCatchList(expr, classes, parentenv, handlers) sampler_directed_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, 36: "bernoulli", TRUE, covarList = covarList_directed)tryCatch(withCallingHandlers({ mySBM_sbm$optimize(estimOptions = list(verbosity = 0, eval(code, test_env) plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$setModel(Q) if (snapshot_skipped) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, skip("On CRAN") covariates = covarList_directed) } cls <- net$clustering(1:(2 * Q)) else if (!new_expectations && skip_on_empty) { cl <- cls[[Q]] skip_empty() mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, } clusterInit = cl, covarList = covarList_directed)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM$doVEM(trace = TRUE) if (on_cran()) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip(paste0("{", e$package, "} is not installed.")) 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, snapshot_on_cran = function(cnd) { 0.8) snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), invokeRestart("muffle_cran_snapshot") 0.05)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 37: 0.85)doWithOneRestart(return(expr), restart) })
38: 30: withOneRestart(expr, restarts[[1L]])eval(code, test_env)
39: 31: withRestarts(tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations32: if (snapshot_skipped) {withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), snapshot_skipped <<- TRUE end_test = function() { invokeRestart("muffle_cran_snapshot") })}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 33: StopReporter$new())doTryCatch(return(expr), name, parentenv, handler)
41: 34: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error_call = error_call)
35: 42: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...)
36: 43: tryCatch(withCallingHandlers({lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, eval(code, test_env) error_call = error_call) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {44: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) }
else if (!new_expectations && skip_on_empty) {45: skip_empty()tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {46: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) skip(paste0("{", e$package, "} is not installed."))
}47: }, snapshot_on_cran = function(cnd) {tryCatch(code, testthat_abort_reporter = function(cnd) { snapshot_skipped <<- TRUE cat(conditionMessage(cnd), "\n") invokeRestart("muffle_cran_snapshot") NULL}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
48: 37: with_reporter(reporters$multi, lapply(test_paths, test_one_file, doWithOneRestart(return(expr), restart) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
38: 49: withOneRestart(expr, restarts[[1L]])test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 39: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, withRestarts(tryCatch(withCallingHandlers({ desc = desc, load_package = load_package, shuffle = shuffle, eval(code, test_env) error_call = error_call) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {50: skip("On CRAN")test_files(test_dir = path, test_paths = test_paths, test_package = package, } reporter = reporter, load_helpers = load_helpers, env = env, else if (!new_expectations && skip_on_empty) { stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip_empty() load_package = load_package, parallel = parallel, shuffle = shuffle) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {51: if (on_cran()) {test_dir("testthat", package = package, reporter = reporter, skip(paste0("{", e$package, "} is not installed.")) ..., load_package = "installed") }
}, snapshot_on_cran = function(cnd) {52: snapshot_skipped <<- TRUEtest_check("missSBM") invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, An irrecoverable exception occurred. R is aborting now ...
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) {
Traceback:
snapshot_skipped <<- TRUE 1: invokeRestart("muffle_cran_snapshot")dispatcher(membership_name, membership_init$to_cc(), model_name, }, skip = handle_skip, warning = handle_warning, message = handle_message, .self$network_to_cc(), TRUE) error = handle_error, interrupt = handle_interrupt)
21: 2: doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...)
22: 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])lapply(X = S, FUN = FUN, ...)
23: 4: tryCatchList(expr, classes, parentenv, handlers)doTryCatch(return(expr), name, parentenv, handler)
24: 5: tryCatch(withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 6: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN")
} 7: else if (!new_expectations && skip_on_empty) {tryCatch(expr, error = function(e) { skip_empty() call <- conditionCall(e) } if (!is.null(call)) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (identical(call[[1L]], quote(doTryCatch))) if (on_cran()) { call <- sys.call(-4L) skip(paste0("{", e$package, "} is not installed.")) dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ")}, snapshot_on_cran = function(cnd) { LONG <- 75L snapshot_skipped <<- TRUE sm <- strsplit(conditionMessage(e), "\n")[[1L]] invokeRestart("muffle_cran_snapshot") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (is.na(w)) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")25: if (w > LONG) doWithOneRestart(return(expr), restart) prefix <- paste0(prefix, "\n ")
}26: else prefix <- "Error : "withOneRestart(expr, restarts[[1L]]) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))27: if (!silent && isTRUE(getOption("show.error.messages"))) {withRestarts(tryCatch(withCallingHandlers({ cat(msg, file = outFile) eval(code, test_env) .Internal(printDeferredWarnings()) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { invisible(structure(msg, class = "try-error", condition = e)) skip("On CRAN")}) }
else if (!new_expectations && skip_on_empty) { 8: skip_empty()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 9: if (on_cran()) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip(paste0("{", e$package, "} is not installed."))
}10: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")11: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(seq_len(cores), inner.do) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {12: })parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)
13: 28: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, test_code(code, parent.frame()) verbose = (verbosity > 4))
29: 14: .self$do_with_inits(inits, Q, reinitialization_effort)
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 15: { sampler_undirected_nocov$rNetwork(store = TRUE).self$estim_ascend(reinitialization_effort, changing_effort) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData,
"bernoulli", FALSE)16: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, private$BMobject$estimate()
17: plot = FALSE)) mySBM_sbm$setModel(3)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)18: cl <- net$clustering(3)[[1]]eval(code, test_env)
mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl)19: mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05)eval(code, test_env)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)20: withCallingHandlers({ eval(code, test_env) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), new_expectations <- the$test_expectations > starting_expectations 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), if (snapshot_skipped) { 0.05) skip("On CRAN") } expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), else if (!new_expectations && skip_on_empty) { skip_empty() 0.95) }) }}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {30: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
31: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEeval(code, test_env)
invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 32: error = handle_error, interrupt = handle_interrupt)withCallingHandlers({
21: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {
skip("On CRAN")22: } else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]])
skip_empty() }23: tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {24: skip(paste0("{", e$package, "} is not installed.")) }tryCatch(withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt)
skip("On CRAN")33: } else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler)
skip_empty() }34: tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {
35: skip(paste0("{", e$package, "} is not installed.")) }tryCatchList(expr, classes, parentenv, handlers)
}, snapshot_on_cran = function(cnd) {36: tryCatch(withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip("On CRAN")
}25: else if (!new_expectations && skip_on_empty) { skip_empty()doWithOneRestart(return(expr), restart)
}}, expectation = handle_expectation, packageNotFoundError = function(e) {26: withOneRestart(expr, restarts[[1L]]) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))
27: }}, snapshot_on_cran = function(cnd) {withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: skip("On CRAN") }doWithOneRestart(return(expr), restart)
else if (!new_expectations && skip_on_empty) { skip_empty()38: withOneRestart(expr, restarts[[1L]]) }}, expectation = handle_expectation, packageNotFoundError = function(e) {
39: if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) { skip_empty()
28: }test_code(code, parent.frame())}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {29: skip(paste0("{", e$package, "} is not installed.")) }test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, invokeRestart("muffle_cran_snapshot") "bernoulli", FALSE)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), plot = FALSE)) end_test = function() { mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) })
cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, 40: clusterInit = cl)test_code(code = exprs, env = env, reporter = get_reporter() %||% mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), StopReporter$new()) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.95)41: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), source_file(path, env = env(env), desc = desc, shuffle = shuffle, 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), error_call = error_call)
0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 42: 0.95)FUN(X[[i]], ...) })
43: 30: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)eval(code, test_env)
44: 31: doTryCatch(return(expr), name, parentenv, handler)eval(code, test_env)
45: 32: tryCatchOne(expr, names, parentenv, handlers[[1L]])withCallingHandlers({ eval(code, test_env)
46: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers)
skip("On CRAN") }47: else if (!new_expectations && skip_on_empty) { skip_empty()tryCatch(code, testthat_abort_reporter = function(cnd) { } cat(conditionMessage(cnd), "\n")}, expectation = handle_expectation, packageNotFoundError = function(e) { NULL if (on_cran()) {}) skip(paste0("{", e$package, "} is not installed.")) }
48: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEwith_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,
49: error = handle_error, interrupt = handle_interrupt)
test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 33: doTryCatch(return(expr), name, parentenv, handler) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 34: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, tryCatch(withCallingHandlers({ reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { load_package = load_package, parallel = parallel, shuffle = shuffle)
skip("On CRAN")51: }test_dir("testthat", package = package, reporter = reporter, else if (!new_expectations && skip_on_empty) { ..., load_package = "installed") skip_empty()
}52: test_check("missSBM")}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {
An irrecoverable exception occurred. R is aborting now ...
skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14:
Traceback:
1: .self$do_with_inits(inits, Q, reinitialization_effort)dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
15: 2: .self$estim_ascend(reinitialization_effort, changing_effort)FUN(X[[i]], ...)
16: 3: private$BMobject$estimate()lapply(X = S, FUN = FUN, ...)
17: 4: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))doTryCatch(return(expr), name, parentenv, handler)
18: 5: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
19: 6: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers)
20: 7: withCallingHandlers({tryCatch(expr, error = function(e) { eval(code, test_env) call <- conditionCall(e) new_expectations <- the$test_expectations > starting_expectations if (!is.null(call)) { if (snapshot_skipped) { if (identical(call[[1L]], quote(doTryCatch))) skip("On CRAN") } else if (!new_expectations && skip_on_empty) { call <- sys.call(-4L) skip_empty() dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ")}, expectation = handle_expectation, packageNotFoundError = function(e) { LONG <- 75L if (on_cran()) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] skip(paste0("{", e$package, "} is not installed.")) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE if (is.na(w)) invokeRestart("muffle_cran_snapshot") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], }, skip = handle_skip, warning = handle_warning, message = handle_message, type = "b") error = handle_error, interrupt = handle_interrupt) if (w > LONG)
prefix <- paste0(prefix, "\n ")21: }doTryCatch(return(expr), name, parentenv, handler) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")22: .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) cat(msg, file = outFile)
.Internal(printDeferredWarnings())23: }tryCatchList(expr, classes, parentenv, handlers) invisible(structure(msg, class = "try-error", condition = e))
})24:
tryCatch(withCallingHandlers({ 8: eval(code, test_env)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) new_expectations <- the$test_expectations > starting_expectations
9: if (snapshot_skipped) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip("On CRAN")
}10: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty()
}11: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(seq_len(cores), inner.do)
if (on_cran()) {12: skip(paste0("{", e$package, "} is not installed."))parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, } mc.silent = TRUE)
}, snapshot_on_cran = function(cnd) {13: snapshot_skipped <<- TRUEparallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, invokeRestart("muffle_cran_snapshot") verbose = (verbosity > 4))}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
14: 25: .self$do_with_inits(inits, Q, reinitialization_effort)doWithOneRestart(return(expr), restart)
15: 26: .self$estim_ascend(reinitialization_effort, changing_effort)withOneRestart(expr, restarts[[1L]])
16: 27: withRestarts(tryCatch(withCallingHandlers({private$BMobject$estimate() eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {17: skip("On CRAN")mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }
18: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
}19: }, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))20: }withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() { else if (!new_expectations && skip_on_empty) { })
skip_empty() }28: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {test_code(code, parent.frame()) skip(paste0("{", e$package, "} is not installed."))
}29: }, snapshot_on_cran = function(cnd) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", snapshot_skipped <<- TRUE { sampler_directed_nocov$rNetwork(store = TRUE) invokeRestart("muffle_cran_snapshot") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, }, skip = handle_skip, warning = handle_warning, message = handle_message, "bernoulli", TRUE) error = handle_error, interrupt = handle_interrupt) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
21: plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)doTryCatch(return(expr), name, parentenv, handler)
22: cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: clusterInit = cl)tryCatchList(expr, classes, parentenv, handlers) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 24: 0.1)tryCatch(withCallingHandlers({ eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), new_expectations <- the$test_expectations > starting_expectations 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), if (snapshot_skipped) { 0.01) skip("On CRAN") } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), else if (!new_expectations && skip_on_empty) { skip_empty() 0.1) } expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.2) if (on_cran()) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), skip(paste0("{", e$package, "} is not installed.")) 0.95) } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE30: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
31: 25: doWithOneRestart(return(expr), restart)eval(code, test_env)
26: 32: withOneRestart(expr, restarts[[1L]])withCallingHandlers({
eval(code, test_env)27: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else if (!new_expectations && skip_on_empty) { skip("On CRAN") skip_empty() } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") }}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, snapshot_skipped <<- TRUE error = handle_error, interrupt = handle_interrupt) invokeRestart("muffle_cran_snapshot")
33: }, skip = handle_skip, warning = handle_warning, message = handle_message, doTryCatch(return(expr), name, parentenv, handler) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
35: 28: tryCatchList(expr, classes, parentenv, handlers)test_code(code, parent.frame())
29: 36: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", tryCatch(withCallingHandlers({ eval(code, test_env) { sampler_directed_nocov$rNetwork(store = TRUE) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) skip("On CRAN") } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, else if (!new_expectations && skip_on_empty) { plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] skip_empty() mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, }}, expectation = handle_expectation, packageNotFoundError = function(e) { clusterInit = cl) if (on_cran()) { mySBM_missSBM$doVEM() skip(paste0("{", e$package, "} is not installed.")) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE 0.1) invokeRestart("muffle_cran_snapshot") expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.95) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 37: 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), doWithOneRestart(return(expr), restart) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 38: withOneRestart(expr, restarts[[1L]]) 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) })
30: 39: withRestarts(tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) { skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {32: skip_empty()withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) { skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, expectation = handle_expectation, packageNotFoundError = function(e) { end_test = function() { if (on_cran()) { }) skip(paste0("{", e$package, "} is not installed."))
}40: }, snapshot_on_cran = function(cnd) {test_code(code = exprs, env = env, reporter = get_reporter() %||% snapshot_skipped <<- TRUE StopReporter$new()) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 41: error = handle_error, interrupt = handle_interrupt)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)33:
doTryCatch(return(expr), name, parentenv, handler)42:
FUN(X[[i]], ...)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 35: error_call = error_call)tryCatchList(expr, classes, parentenv, handlers)
44: 36: doTryCatch(return(expr), name, parentenv, handler)tryCatch(withCallingHandlers({
eval(code, test_env)45: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")46: tryCatchList(expr, classes, parentenv, handlers)
}47: else if (!new_expectations && skip_on_empty) { skip_empty()tryCatch(code, testthat_abort_reporter = function(cnd) { } cat(conditionMessage(cnd), "\n")}, expectation = handle_expectation, packageNotFoundError = function(e) { NULL if (on_cran()) {}) skip(paste0("{", e$package, "} is not installed."))
}48: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEwith_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)49:
test_files_serial(test_dir = test_dir, test_package = test_package, 37: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, doWithOneRestart(return(expr), restart) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)38:
withOneRestart(expr, restarts[[1L]])50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 39: reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, withRestarts(tryCatch(withCallingHandlers({ load_package = load_package, parallel = parallel, shuffle = shuffle) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations51: if (snapshot_skipped) {test_dir("testthat", package = package, reporter = reporter, skip("On CRAN") ..., load_package = "installed") }
else if (!new_expectations && skip_on_empty) {52: skip_empty()test_check("missSBM") }
}, expectation = handle_expectation, packageNotFoundError = function(e) {An irrecoverable exception occurred. R is aborting now ...
if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-44.R
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• On CRAN (3): 'test-explore-block-count.R:4:3',
'test-missSBM_collection-degenerate.R:80:3',
'test-missSBM_collection-estimate_chain.R:64:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [13s/16s] OK
- checking PDF version of manual ... [4s/4s] OK
- DONE
Status: 1 ERROR