Last updated on 2026-10-19 05:52:14 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 88.36 | 352.66 | 441.02 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 57.66 | 234.28 | 291.94 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 57.00 | 247.35 | 304.35 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 63.00 | 247.59 | 310.59 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 95.00 | 449.00 | 544.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 85.58 | 342.08 | 427.66 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 86.79 | 329.37 | 416.16 | OK | |
| r-release-macos-arm64 | 1.1.0 | 17.00 | 92.00 | 109.00 | OK | |
| r-release-macos-x86_64 | 1.1.0 | 59.00 | 456.00 | 515.00 | OK | |
| r-release-windows-x86_64 | 1.1.0 | 98.00 | 358.00 | 456.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 21.00 | 86.00 | 107.00 | ERROR | |
| r-oldrel-macos-x86_64 | 1.1.0 | 59.00 | 679.00 | 738.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.0 | 119.00 | 528.00 | 647.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [38s/31s]
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,
Traceback:
.self$network_to_cc(), TRUE) 1: dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE) 2:
FUN(X[[i]], ...) 2:
FUN(X[[i]], ...) 3:
lapply(X = S, FUN = FUN, ...) 3:
lapply(X = S, FUN = FUN, ...) 4:
doTryCatch(return(expr), name, parentenv, handler) 4:
doTryCatch(return(expr), name, parentenv, handler) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6:
tryCatchList(expr, classes, parentenv, handlers) 6:
tryCatchList(expr, classes, parentenv, handlers) 7:
tryCatch(expr, error = function(e) { 7: call <- conditionCall(e)tryCatch(expr, error = function(e) { if (!is.null(call)) { call <- conditionCall(e) if (identical(call[[1L]], quote(doTryCatch))) if (!is.null(call)) { call <- sys.call(-4L) if (identical(call[[1L]], quote(doTryCatch))) dcall <- deparse(call, nlines = 1L) call <- sys.call(-4L) prefix <- paste("Error in", dcall, ": ") dcall <- deparse(call, nlines = 1L) LONG <- 75L prefix <- paste("Error in", dcall, ": ") sm <- strsplit(conditionMessage(e), "\n")[[1L]] LONG <- 75L w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (is.na(w)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (is.na(w)) type = "b") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (w > LONG) type = "b") prefix <- paste0(prefix, "\n ") if (w > LONG) } prefix <- paste0(prefix, "\n ") else prefix <- "Error : " } msg <- paste0(prefix, conditionMessage(e), "\n") else prefix <- "Error : " .Internal(seterrmessage(msg[1L])) msg <- paste0(prefix, conditionMessage(e), "\n") if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(seterrmessage(msg[1L])) cat(msg, file = outFile) if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(printDeferredWarnings()) cat(msg, file = outFile) } .Internal(printDeferredWarnings()) invisible(structure(msg, class = "try-error", condition = e)) }}) invisible(structure(msg, class = "try-error", condition = e))
}) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))10:
FUN(X[[i]], ...)10:
FUN(X[[i]], ...)11:
lapply(seq_len(cores), inner.do)11:
lapply(seq_len(cores), inner.do)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 12: mc.silent = TRUE)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, 13: verbose = (verbosity > 4))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))14:
.self$do_with_inits(inits, Q, reinitialization_effort)14:
.self$do_with_inits(inits, Q, reinitialization_effort)15:
.self$estim_ascend(reinitialization_effort, changing_effort)15:
.self$estim_ascend(reinitialization_effort, changing_effort)16:
private$BMobject$estimate()16:
private$BMobject$estimate()17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))18:
eval(code, test_env)18:
eval(code, test_env)19:
eval(code, test_env)19:
eval(code, test_env)20:
withCallingHandlers({20: eval(code, test_env)withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)21:
doTryCatch(return(expr), name, parentenv, handler)21:
doTryCatch(return(expr), name, parentenv, handler)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])23:
tryCatchList(expr, classes, parentenv, handlers)23:
tryCatchList(expr, classes, parentenv, handlers)24:
tryCatch(withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)25:
doWithOneRestart(return(expr), restart)25:
doWithOneRestart(return(expr), restart)26:
withOneRestart(expr, restarts[[1L]])26:
withOneRestart(expr, restarts[[1L]])27:
withRestarts(tryCatch(withCallingHandlers({27: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }) end_test = function() {
})28:
test_code(code, parent.frame())28:
test_code(code, parent.frame())29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", 29: {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", sampler_undirected_cov$rNetwork(store = TRUE) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, sampler_undirected_cov$rNetwork(store = TRUE) "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, "bernoulli", FALSE, covarList = covarList_undirected) plot = FALSE)) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_sbm$setModel(Q) plot = FALSE)) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, mySBM_sbm$setModel(Q) covariates = covarList_undirected) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, cls <- net$clustering(1:(2 * Q)) covariates = covarList_undirected) cl <- cls[[Q]] cls <- net$clustering(1:(2 * Q)) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, cl <- cls[[Q]] clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, mySBM_missSBM$doVEM() clusterInit = cl, covarList = covarList_undirected) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_missSBM$doVEM() 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.05) 0.8) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.8) 0.01) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.01) 0.1) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.1) 0.85) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), }) 0.85)
})30:
eval(code, test_env)30:
eval(code, test_env)31:
eval(code, test_env)31:
eval(code, test_env)32:
withCallingHandlers({32: eval(code, test_env)withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)33:
doTryCatch(return(expr), name, parentenv, handler)33:
doTryCatch(return(expr), name, parentenv, handler)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])35:
tryCatchList(expr, classes, parentenv, handlers)35:
tryCatchList(expr, classes, parentenv, handlers)36:
tryCatch(withCallingHandlers({36: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)37:
doWithOneRestart(return(expr), restart)37:
doWithOneRestart(return(expr), restart)38:
withOneRestart(expr, restarts[[1L]])38:
withOneRestart(expr, restarts[[1L]])39:
withRestarts(tryCatch(withCallingHandlers({39: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }) end_test = function() {
})40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 40: StopReporter$new())test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 41: error_call = error_call)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)42:
FUN(X[[i]], ...)42:
FUN(X[[i]], ...)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 43: error_call = error_call)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)44:
doTryCatch(return(expr), name, parentenv, handler)44:
doTryCatch(return(expr), name, parentenv, handler)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])46:
tryCatchList(expr, classes, parentenv, handlers)46:
tryCatchList(expr, classes, parentenv, handlers)47:
tryCatch(code, testthat_abort_reporter = function(cnd) {47: cat(conditionMessage(cnd), "\n")tryCatch(code, testthat_abort_reporter = function(cnd) { NULL cat(conditionMessage(cnd), "\n")}) NULL
})48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 48: env = env, desc = desc, shuffle = shuffle, error_call = error_call))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, 49: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, test_files_serial(test_dir = test_dir, test_package = test_package, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, desc = desc, load_package = load_package, shuffle = shuffle, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, error_call = error_call) 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, 50: reporter = reporter, load_helpers = load_helpers, env = env, test_files(test_dir = path, test_paths = test_paths, test_package = package, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, reporter = reporter, load_helpers = load_helpers, env = env, load_package = load_package, parallel = parallel, shuffle = shuffle) 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, 51: ..., load_package = "installed")test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")52:
test_check("missSBM")52:
test_check("missSBM")An irrecoverable exception occurred. R is aborting now ...
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)
Traceback:
prefix <- paste0(prefix, "\n ") 1: }dispatcher(membership_name, membership_init$to_cc(), model_name, else prefix <- "Error : " .self$network_to_cc(), TRUE)
msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) 2: if (!silent && isTRUE(getOption("show.error.messages"))) {FUN(X[[i]], ...) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) 3: }lapply(X = S, FUN = FUN, ...) invisible(structure(msg, class = "try-error", condition = e))
}) 4:
doTryCatch(return(expr), name, parentenv, handler) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 6:
tryCatchList(expr, classes, parentenv, handlers)10:
FUN(X[[i]], ...) 7:
tryCatch(expr, error = function(e) {11: lapply(seq_len(cores), inner.do)
call <- conditionCall(e) if (!is.null(call)) {12: if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, dcall <- deparse(call, nlines = 1L) mc.silent = TRUE) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L13: sm <- strsplit(conditionMessage(e), "\n")[[1L]]parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w)) 14: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], .self$do_with_inits(inits, Q, reinitialization_effort) type = "b")
if (w > LONG) 15: prefix <- paste0(prefix, "\n ").self$estim_ascend(reinitialization_effort, changing_effort) }
else prefix <- "Error : "16: msg <- paste0(prefix, conditionMessage(e), "\n")private$BMobject$estimate() .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {17: cat(msg, file = outFile)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) .Internal(printDeferredWarnings())
}18: invisible(structure(msg, class = "try-error", condition = e))eval(code, test_env)})
19: 8: eval(code, test_env)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
20: 9: withCallingHandlers({sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations10: if (snapshot_skipped) {FUN(X[[i]], ...)
skip("On CRAN") }11: else if (!new_expectations && skip_on_empty) {lapply(seq_len(cores), inner.do) skip_empty()
}}, 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)14:
21: .self$do_with_inits(inits, Q, reinitialization_effort)doTryCatch(return(expr), name, parentenv, handler)
15: 22: .self$estim_ascend(reinitialization_effort, changing_effort)tryCatchOne(expr, names, parentenv, handlers[[1L]])
16: 23: private$BMobject$estimate()tryCatchList(expr, classes, parentenv, handlers)
17: 24: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))tryCatch(withCallingHandlers({
eval(code, test_env)18: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN")19: }eval(code, test_env)
else if (!new_expectations && skip_on_empty) {20: skip_empty()withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))25: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE26: invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)27: withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)21: new_expectations <- the$test_expectations > starting_expectationsdoTryCatch(return(expr), name, parentenv, handler) if (snapshot_skipped) {
skip("On CRAN")22: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else if (!new_expectations && skip_on_empty) {
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({ } 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) { if (on_cran()) {28: skip(paste0("{", e$package, "} is not installed."))test_code(code, parent.frame()) }
}, snapshot_on_cran = function(cnd) {29: snapshot_skipped <<- TRUEtest_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", invokeRestart("muffle_cran_snapshot") {}, skip = handle_skip, warning = handle_warning, message = handle_message, sampler_directed_cov$rNetwork(store = TRUE) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData,
"bernoulli", TRUE, covarList = covarList_directed)25: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, doWithOneRestart(return(expr), restart) plot = FALSE))
mySBM_sbm$setModel(Q)26: net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, withOneRestart(expr, restarts[[1L]]) covariates = covarList_directed)
cls <- net$clustering(1:(2 * Q))27: cl <- cls[[Q]]withRestarts(tryCatch(withCallingHandlers({ mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, eval(code, test_env) clusterInit = cl, covarList = covarList_directed) new_expectations <- the$test_expectations > starting_expectations mySBM_missSBM$doVEM(trace = TRUE) if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip("On CRAN") 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), else if (!new_expectations && skip_on_empty) { 0.8) skip_empty() expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.05)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), } 0.85)}, snapshot_on_cran = function(cnd) { }) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")30: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), eval(code, test_env) end_test = function() {
})31:
eval(code, test_env)28:
test_code(code, parent.frame())32:
withCallingHandlers({29: eval(code, test_env)test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", new_expectations <- the$test_expectations > starting_expectations { if (snapshot_skipped) { sampler_directed_cov$rNetwork(store = TRUE) skip("On CRAN") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, } "bernoulli", TRUE, covarList = covarList_directed) else if (!new_expectations && skip_on_empty) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip_empty() plot = FALSE)) } mySBM_sbm$setModel(Q)}, expectation = handle_expectation, packageNotFoundError = function(e) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, if (on_cran()) { covariates = covarList_directed) skip(paste0("{", e$package, "} is not installed.")) cls <- net$clustering(1:(2 * Q)) } cl <- cls[[Q]]}, snapshot_on_cran = function(cnd) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, snapshot_skipped <<- TRUE clusterInit = cl, covarList = covarList_directed) invokeRestart("muffle_cran_snapshot") mySBM_missSBM$doVEM(trace = TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), error = handle_error, interrupt = handle_interrupt) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 33: 0.8)doTryCatch(return(expr), name, parentenv, handler) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.05)34: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), tryCatchOne(expr, names, parentenv, handlers[[1L]])
0.1)35: expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), tryCatchList(expr, classes, parentenv, handlers) 0.85)
})36:
tryCatch(withCallingHandlers({30: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {31: 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) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))37: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE38: invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)39:
withRestarts(tryCatch(withCallingHandlers({33: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations
34: if (snapshot_skipped) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip("On CRAN")
}35: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) {36: if (on_cran()) {tryCatch(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, } 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) {40: if (on_cran()) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip(paste0("{", e$package, "} is not installed.")) StopReporter$new())
}41: }, snapshot_on_cran = function(cnd) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 42: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)FUN(X[[i]], ...)
37: 43: doWithOneRestart(return(expr), restart)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)38:
withOneRestart(expr, restarts[[1L]])44:
doTryCatch(return(expr), name, parentenv, handler)39:
withRestarts(tryCatch(withCallingHandlers({45: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {46: skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) }
else if (!new_expectations && skip_on_empty) {47: 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) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, snapshot_skipped <<- TRUE 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), error = handle_fatal), test_files_serial(test_dir = test_dir, test_package = test_package, end_test = function() { 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, 40: error_call = error_call)test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 41: reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, source_file(path, env = env(env), desc = desc, shuffle = shuffle, load_package = load_package, parallel = parallel, shuffle = shuffle) error_call = error_call)
51: 42: test_dir("testthat", package = package, reporter = reporter, FUN(X[[i]], ...) ..., load_package = "installed")
43: 52: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, test_check("missSBM") error_call = error_call)
An irrecoverable exception occurred. R is aborting now ...
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)
Traceback:
19: 1: eval(code, test_env)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)20:
withCallingHandlers({ 2: eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 3: skip("On CRAN") }lapply(X = S, FUN = FUN, ...) else if (!new_expectations && skip_on_empty) {
skip_empty() 4: }doTryCatch(return(expr), name, parentenv, handler)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { 5: skip(paste0("{", e$package, "} is not installed."))tryCatchOne(expr, names, parentenv, handlers[[1L]]) }}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE 6: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
7: error = handle_error, interrupt = handle_interrupt)tryCatch(expr, error = function(e) {
call <- conditionCall(e)21: if (!is.null(call)) {doTryCatch(return(expr), name, parentenv, handler) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)22: dcall <- deparse(call, nlines = 1L)tryCatchOne(expr, names, parentenv, handlers[[1L]]) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L23: sm <- strsplit(conditionMessage(e), "\n")[[1L]]tryCatchList(expr, classes, parentenv, handlers)
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")24: if (is.na(w)) tryCatch(withCallingHandlers({ w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], eval(code, test_env) type = "b") new_expectations <- the$test_expectations > starting_expectations if (w > LONG) if (snapshot_skipped) { prefix <- paste0(prefix, "\n ") skip("On CRAN") } } else prefix <- "Error : " else if (!new_expectations && skip_on_empty) { msg <- paste0(prefix, conditionMessage(e), "\n") skip_empty() .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) {}, expectation = handle_expectation, packageNotFoundError = function(e) { cat(msg, file = outFile) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) .Internal(printDeferredWarnings()) } }}, snapshot_on_cran = function(cnd) { invisible(structure(msg, class = "try-error", condition = e)) snapshot_skipped <<- TRUE}) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 8: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
25:
doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]]) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))27:
withRestarts(tryCatch(withCallingHandlers({10: eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {11: skip("On CRAN")lapply(seq_len(cores), inner.do) }
else if (!new_expectations && skip_on_empty) {12: skip_empty()parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, } mc.silent = TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {13: skip(paste0("{", e$package, "} is not installed."))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE14: .self$do_with_inits(inits, Q, reinitialization_effort) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 15: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), .self$estim_ascend(reinitialization_effort, changing_effort) end_test = function() {
})16:
private$BMobject$estimate()28:
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))test_code(code, parent.frame())
18: 29: eval(code, test_env)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate",
{19: sampler_undirected_nocov$rNetwork(store = TRUE)eval(code, test_env) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData,
"bernoulli", FALSE)20: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, withCallingHandlers({ eval(code, test_env) plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$setModel(3) if (snapshot_skipped) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) skip("On CRAN") } cl <- net$clustering(3)[[1]] else if (!new_expectations && skip_on_empty) { skip_empty() mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, } clusterInit = cl)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM$doVEM() if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.05)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 0.01)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), error = handle_error, interrupt = handle_interrupt) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships),
0.95) })21:
doTryCatch(return(expr), name, parentenv, handler)30:
eval(code, test_env)22:
31: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(code, test_env)
23:
tryCatchList(expr, classes, parentenv, handlers)32:
withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE 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_error, interrupt = handle_interrupt), error = handle_fatal)
33: 25: doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: 26: tryCatchList(expr, classes, parentenv, handlers)withOneRestart(expr, restarts[[1L]])
36:
27: tryCatch(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), error = handle_fatal),
end_test = function() {37: })doWithOneRestart(return(expr), restart)
28:
test_code(code, parent.frame())38:
withOneRestart(expr, restarts[[1L]])29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 39: withRestarts(tryCatch(withCallingHandlers({ { eval(code, test_env) sampler_undirected_nocov$rNetwork(store = TRUE) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE) if (snapshot_skipped) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip("On CRAN") plot = FALSE)) } mySBM_sbm$setModel(3) else if (!new_expectations && skip_on_empty) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) skip_empty() cl <- net$clustering(3)[[1]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, }, 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), } 0.05)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), snapshot_skipped <<- TRUE 0.95) invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.05) end_test = function() { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), }) 0.95) })
40: 30: test_code(code = exprs, env = env, reporter = get_reporter() %||% eval(code, test_env) StopReporter$new())
31: 41: eval(code, test_env)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)32:
withCallingHandlers({42: eval(code, test_env)FUN(X[[i]], ...)
new_expectations <- the$test_expectations > starting_expectations43: if (snapshot_skipped) { skip("On CRAN")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) }
44: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) {45: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}46: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")47: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(code, testthat_abort_reporter = function(cnd) { error = handle_error, interrupt = handle_interrupt) cat(conditionMessage(cnd), "\n")
NULL33: })doTryCatch(return(expr), name, parentenv, handler)
48: 34: with_reporter(reporters$multi, lapply(test_paths, test_one_file, tryCatchOne(expr, names, parentenv, handlers[[1L]]) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
35: 49: tryCatchList(expr, classes, parentenv, handlers)test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 36: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 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)
}51: }, expectation = handle_expectation, packageNotFoundError = function(e) { 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: test_check("missSBM") snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")An irrecoverable exception occurred. R is aborting now ...
}, 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)
Traceback:
1: if (!is.null(call)) {dispatcher(membership_name, membership_init$to_cc(), model_name, if (identical(call[[1L]], quote(doTryCatch))) .self$network_to_cc(), TRUE) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L) 2: prefix <- paste("Error in", dcall, ": ")FUN(X[[i]], ...) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]] 3: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")lapply(X = S, FUN = FUN, ...) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 4: type = "b")doTryCatch(return(expr), name, parentenv, handler) if (w > LONG)
prefix <- paste0(prefix, "\n ") 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) } else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n") 6: .Internal(seterrmessage(msg[1L]))tryCatchList(expr, classes, parentenv, handlers) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile) 7: .Internal(printDeferredWarnings())tryCatch(expr, error = function(e) { call <- conditionCall(e) } invisible(structure(msg, class = "try-error", condition = e)) if (!is.null(call)) {}) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L) 8: dcall <- deparse(call, nlines = 1L)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L 9: sm <- strsplit(conditionMessage(e), "\n")[[1L]]sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w)) 10: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], FUN(X[[i]], ...) type = "b")
11: if (w > LONG) lapply(seq_len(cores), inner.do)
prefix <- paste0(prefix, "\n ") }12: else prefix <- "Error : "parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, msg <- paste0(prefix, conditionMessage(e), "\n") mc.silent = TRUE) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {13: cat(msg, file = outFile)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, .Internal(printDeferredWarnings()) verbose = (verbosity > 4)) }
invisible(structure(msg, class = "try-error", condition = e))14: }).self$do_with_inits(inits, Q, reinitialization_effort)
15: 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE).self$estim_ascend(reinitialization_effort, changing_effort)
9: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))private$BMobject$estimate()
10: 17: FUN(X[[i]], ...)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
11: 18: lapply(seq_len(cores), inner.do)eval(code, test_env)
19: 12: eval(code, test_env)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)20: withCallingHandlers({
eval(code, test_env)13: new_expectations <- the$test_expectations > starting_expectationsparallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, if (snapshot_skipped) { verbose = (verbosity > 4)) skip("On CRAN")
}14: else if (!new_expectations && skip_on_empty) {.self$do_with_inits(inits, Q, reinitialization_effort) skip_empty()
}15: }, expectation = handle_expectation, packageNotFoundError = function(e) {.self$estim_ascend(reinitialization_effort, changing_effort) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))16: }private$BMobject$estimate()}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE17: invokeRestart("muffle_cran_snapshot")mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)18:
eval(code, test_env)21: doTryCatch(return(expr), name, parentenv, handler)
19: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(code, test_env)
23: tryCatchList(expr, classes, parentenv, handlers)20:
withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { skip_empty() } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)21:
doTryCatch(return(expr), name, parentenv, handler)25:
doWithOneRestart(return(expr), restart)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])26:
withOneRestart(expr, restarts[[1L]])23:
tryCatchList(expr, classes, parentenv, handlers)27:
withRestarts(tryCatch(withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) })
28: 25: test_code(code, parent.frame())doWithOneRestart(return(expr), restart)
26: 29: withOneRestart(expr, restarts[[1L]])test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate",
{ sampler_directed_nocov$rNetwork(store = TRUE)27: withRestarts(tryCatch(withCallingHandlers({ mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, eval(code, test_env) "bernoulli", TRUE) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (snapshot_skipped) { plot = FALSE)) skip("On CRAN") mySBM_sbm$setModel(3) } net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] else if (!new_expectations && skip_on_empty) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, skip_empty() } clusterInit = cl)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM$doVEM() 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.95) snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), invokeRestart("muffle_cran_snapshot") 0.01)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.1) end_test = function() { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), }) 0.2)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 28: 0.95)test_code(code, parent.frame())
})29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", 30: {eval(code, test_env) sampler_directed_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE)31: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, eval(code, test_env) plot = FALSE))
mySBM_sbm$setModel(3)32: net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)withCallingHandlers({ cl <- net$clustering(3)[[1]] eval(code, test_env) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, new_expectations <- the$test_expectations > starting_expectations clusterInit = cl) if (snapshot_skipped) { mySBM_missSBM$doVEM() skip("On CRAN") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.1) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), skip_empty() 0.95) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.01) if (on_cran()) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), skip(paste0("{", e$package, "} is not installed.")) 0.1) } expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), }, snapshot_on_cran = function(cnd) { 0.2) snapshot_skipped <<- TRUE expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), invokeRestart("muffle_cran_snapshot") 0.95)}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt)
30: 33: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler)
31: 34: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
32: 35: withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) {tryCatch(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()) { 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")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 33: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)doTryCatch(return(expr), name, parentenv, handler)
37: 34: doWithOneRestart(return(expr), restart)tryCatchOne(expr, names, parentenv, handlers[[1L]])
38: 35: withOneRestart(expr, restarts[[1L]])tryCatchList(expr, classes, parentenv, handlers)
39: 36: withRestarts(tryCatch(withCallingHandlers({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) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) })
37: 40: doWithOneRestart(return(expr), restart)test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())38:
withOneRestart(expr, restarts[[1L]])41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 39: error_call = error_call)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)42: new_expectations <- the$test_expectations > starting_expectationsFUN(X[[i]], ...) if (snapshot_skipped) {
skip("On CRAN")43: }lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, else if (!new_expectations && skip_on_empty) { error_call = error_call)
skip_empty()44: }doTryCatch(return(expr), name, parentenv, handler)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {45: skip(paste0("{", e$package, "} is not installed."))tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
}, snapshot_on_cran = function(cnd) {46: snapshot_skipped <<- TRUEtryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 47: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), tryCatch(code, testthat_abort_reporter = function(cnd) { end_test = function() { cat(conditionMessage(cnd), "\n") }) NULL
})40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 48: StopReporter$new())with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))41:
source_file(path, env = 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, 42: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, FUN(X[[i]], ...) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 50: error_call = error_call)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 44: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, doTryCatch(return(expr), name, parentenv, handler) load_package = load_package, parallel = parallel, shuffle = shuffle)
45: 51: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")46:
tryCatchList(expr, classes, parentenv, handlers)52:
test_check("missSBM")
47: An irrecoverable exception occurred. R is aborting now ...
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
Flavor: r-oldrel-macos-arm64