Last updated on 2026-10-16 09:52:37 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 80.54 | 363.82 | 444.36 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 57.97 | 251.00 | 308.97 | 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 | 91.00 | 446.00 | 537.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 | 74.39 | 345.64 | 420.03 | 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 | 95.00 | 361.00 | 456.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 18.00 | 85.00 | 103.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’ [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)
Traceback:
if (!is.null(call)) { 1: if (identical(call[[1L]], quote(doTryCatch))) dispatcher(membership_name, membership_init$to_cc(), model_name, .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")
if (w > LONG) 11: prefix <- paste0(prefix, "\n ")lapply(seq_len(cores), inner.do) }
else prefix <- "Error : "12: msg <- paste0(prefix, conditionMessage(e), "\n")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, .Internal(seterrmessage(msg[1L])) mc.silent = TRUE) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)13: .Internal(printDeferredWarnings())parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4)) invisible(structure(msg, class = "try-error", condition = e))
})14:
.self$do_with_inits(inits, Q, reinitialization_effort) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)15:
.self$estim_ascend(reinitialization_effort, changing_effort) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))16:
private$BMobject$estimate()10:
FUN(X[[i]], ...)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))11:
lapply(seq_len(cores), inner.do)18:
eval(code, test_env)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 19: mc.silent = TRUE)eval(code, test_env)
13: 20: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, withCallingHandlers({ verbose = (verbosity > 4)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations14: if (snapshot_skipped) {.self$do_with_inits(inits, Q, reinitialization_effort) skip("On CRAN")
}15: else if (!new_expectations && skip_on_empty) {.self$estim_ascend(reinitialization_effort, changing_effort) skip_empty()
}16: }, expectation = handle_expectation, packageNotFoundError = function(e) {private$BMobject$estimate() if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE18: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)19:
eval(code, test_env)21:
doTryCatch(return(expr), name, parentenv, handler)20:
withCallingHandlers({22: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {23: skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) }
else if (!new_expectations && skip_on_empty) {24: skip_empty()tryCatch(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)
if (on_cran()) {21: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) }
}, snapshot_on_cran = function(cnd) {22: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 23: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)tryCatchList(expr, classes, parentenv, handlers)
25: 24: doWithOneRestart(return(expr), restart)tryCatch(withCallingHandlers({
eval(code, test_env)26: new_expectations <- the$test_expectations > starting_expectationswithOneRestart(expr, restarts[[1L]]) if (snapshot_skipped) {
skip("On CRAN")27: }withRestarts(tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip(paste0("{", e$package, "} is not installed."))
}25: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEdoWithOneRestart(return(expr), restart) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 26: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), withOneRestart(expr, restarts[[1L]]) end_test = function() {
})27:
withRestarts(tryCatch(withCallingHandlers({28: eval(code, test_env)test_code(code, parent.frame()) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {
skip("On CRAN")29: }test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", else if (!new_expectations && skip_on_empty) { { skip_empty() sampler_undirected_cov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", FALSE, covarList = covarList_undirected) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(Q)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, snapshot_skipped <<- TRUE covariates = covarList_undirected) invokeRestart("muffle_cran_snapshot") cls <- net$clustering(1:(2 * Q))}, skip = handle_skip, warning = handle_warning, message = handle_message, cl <- cls[[Q]] error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, end_test = function() { clusterInit = cl, covarList = covarList_undirected) }) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 28: 0.05)test_code(code, parent.frame()) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)29: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", 0.01) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), sampler_undirected_cov$rNetwork(store = TRUE) 0.1) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), "bernoulli", FALSE, covarList = covarList_undirected) 0.1) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), plot = FALSE)) 0.85) mySBM_sbm$setModel(Q) }) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData,
covariates = covarList_undirected)30: cls <- net$clustering(1:(2 * Q))eval(code, test_env) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 31: clusterInit = cl, covarList = covarList_undirected)eval(code, test_env) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 32: 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), withCallingHandlers({ 0.8) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 0.01) skip("On CRAN") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), } 0.1) else if (!new_expectations && skip_on_empty) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), skip_empty() 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.85) if (on_cran()) { }) skip(paste0("{", e$package, "} is not installed."))
}30: }, snapshot_on_cran = function(cnd) {eval(code, test_env) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 31: error = handle_error, interrupt = handle_interrupt)eval(code, test_env)
33: 32: doTryCatch(return(expr), name, parentenv, handler)withCallingHandlers({
eval(code, test_env)34: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")35: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) {
skip_empty()36: }tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {33: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) }
}, snapshot_on_cran = function(cnd) {34: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)35:
tryCatchList(expr, classes, parentenv, handlers)37:
doWithOneRestart(return(expr), restart)36:
tryCatch(withCallingHandlers({38: withOneRestart(expr, restarts[[1L]])
eval(code, test_env)39: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {withRestarts(tryCatch(withCallingHandlers({ skip("On CRAN") } 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) {
snapshot_skipped <<- TRUE37: invokeRestart("muffle_cran_snapshot")doWithOneRestart(return(expr), restart)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 38: withOneRestart(expr, restarts[[1L]]) end_test = function() {
})39:
withRestarts(tryCatch(withCallingHandlers({40: eval(code, test_env)test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {41: skip("On CRAN")source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) {
skip_empty()42: }FUN(X[[i]], ...)
43: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed."))
}44: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")45: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
46: end_test = function() {tryCatchList(expr, classes, parentenv, handlers) })
47: 40: tryCatch(code, testthat_abort_reporter = function(cnd) {test_code(code = exprs, env = env, reporter = get_reporter() %||% cat(conditionMessage(cnd), "\n") StopReporter$new()) NULL
})41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 48: error_call = error_call)with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))42:
FUN(X[[i]], ...)49:
test_files_serial(test_dir = test_dir, test_package = test_package, 43: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, lapply(test_paths, test_one_file, env = env, desc = desc, 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)44:
doTryCatch(return(expr), name, parentenv, handler)50: test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 45: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatchOne(expr, names, parentenv, handlers[[1L]]) load_package = load_package, parallel = parallel, shuffle = shuffle)
46: 51: test_dir("testthat", package = package, reporter = reporter, tryCatchList(expr, classes, parentenv, handlers) ..., load_package = "installed")
47: 52: tryCatch(code, testthat_abort_reporter = function(cnd) {test_check("missSBM") cat(conditionMessage(cnd), "\n")
NULLAn irrecoverable exception occurred. R is aborting now ...
})
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: 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) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: 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)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: 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() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: 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)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: 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)
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 ...
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) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: 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)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: 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() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: 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)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: 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)
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-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) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: 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.")) }
Traceback:
}, snapshot_on_cran = function(cnd) { 1: snapshot_skipped <<- TRUEdispatcher(membership_name, membership_init$to_cc(), model_name, invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, .self$network_to_cc(), TRUE) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: 2: doWithOneRestart(return(expr), restart)FUN(X[[i]], ...)
26:
withOneRestart(expr, restarts[[1L]]) 3:
lapply(X = S, FUN = FUN, ...)27: withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env) 4: doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 5: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]])
} 6: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) { 7: if (on_cran()) {tryCatch(expr, error = function(e) { skip(paste0("{", e$package, "} is not installed.")) call <- conditionCall(e) } if (!is.null(call)) {}, snapshot_on_cran = function(cnd) { if (identical(call[[1L]], quote(doTryCatch))) snapshot_skipped <<- TRUE call <- sys.call(-4L) invokeRestart("muffle_cran_snapshot") dcall <- deparse(call, nlines = 1L)}, skip = handle_skip, warning = handle_warning, message = handle_message, prefix <- paste("Error in", dcall, ": ") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), LONG <- 75L end_test = function() { sm <- strsplit(conditionMessage(e), "\n")[[1L]] }) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w)) 28: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], test_code(code, parent.frame()) type = "b")
if (w > LONG) 29: prefix <- paste0(prefix, "\n ")test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", } { else prefix <- "Error : " sampler_undirected_nocov$rNetwork(store = TRUE) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, if (!silent && isTRUE(getOption("show.error.messages"))) { "bernoulli", FALSE) cat(msg, file = outFile) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, .Internal(printDeferredWarnings()) plot = FALSE)) } mySBM_sbm$setModel(3) invisible(structure(msg, class = "try-error", condition = e)) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]]}) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net,
clusterInit = cl) 8: mySBM_missSBM$doVEM()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.05) 9: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 10: 0.01)FUN(X[[i]], ...) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean),
0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 11: 0.95)lapply(seq_len(cores), inner.do) })
12:
30: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, eval(code, test_env)
mc.silent = TRUE)31:
eval(code, test_env)13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 32: verbose = (verbosity > 4))
withCallingHandlers({14: eval(code, test_env).self$do_with_inits(inits, Q, reinitialization_effort)
new_expectations <- the$test_expectations > starting_expectations15: if (snapshot_skipped) {.self$estim_ascend(reinitialization_effort, changing_effort) skip("On CRAN") } else if (!new_expectations && skip_on_empty) {
skip_empty()16: }}, expectation = handle_expectation, packageNotFoundError = function(e) {private$BMobject$estimate() if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }17: }, snapshot_on_cran = function(cnd) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")18: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env)
error = handle_error, interrupt = handle_interrupt)19:
eval(code, test_env)33:
doTryCatch(return(expr), name, parentenv, handler)
20: 34: tryCatchOne(expr, names, parentenv, handlers[[1L]])withCallingHandlers({
eval(code, test_env)35: tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations
36: if (snapshot_skipped) {tryCatch(withCallingHandlers({ eval(code, test_env) skip("On CRAN") } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } } 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) { 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)
snapshot_skipped <<- TRUE21: 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)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])37: doWithOneRestart(return(expr), restart)
23: 38: tryCatchList(expr, classes, parentenv, handlers)withOneRestart(expr, restarts[[1L]])
24: 39: tryCatch(withCallingHandlers({ eval(code, test_env) 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()) {}, 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_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, 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), end_test = function() {25: })doWithOneRestart(return(expr), restart)
40: 26: test_code(code = exprs, env = env, reporter = get_reporter() %||% withOneRestart(expr, restarts[[1L]]) StopReporter$new())
27: 41: withRestarts(tryCatch(withCallingHandlers({source_file(path, env = env(env), desc = desc, shuffle = shuffle, eval(code, test_env) error_call = error_call) new_expectations <- the$test_expectations > starting_expectations
42: if (snapshot_skipped) {FUN(X[[i]], ...) skip("On CRAN")
}43: else if (!new_expectations && skip_on_empty) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, skip_empty() error_call = error_call) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {44: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed."))
}45: tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE46: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {47: tryCatch(code, testthat_abort_reporter = function(cnd) { }) cat(conditionMessage(cnd), "\n")
28: NULLtest_code(code, parent.frame())})
29: 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", env = env, desc = desc, shuffle = shuffle, error_call = error_call)) {
49: test_files_serial(test_dir = test_dir, test_package = test_package, sampler_undirected_nocov$rNetwork(store = TRUE) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, desc = desc, load_package = load_package, shuffle = shuffle, "bernoulli", FALSE) error_call = error_call)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 50: plot = FALSE))test_files(test_dir = path, test_paths = test_paths, test_package = package, mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) reporter = reporter, load_helpers = load_helpers, env = env, cl <- net$clustering(3)[[1]] stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, load_package = load_package, parallel = parallel, shuffle = shuffle) clusterInit = cl)
mySBM_missSBM$doVEM()51: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), test_dir("testthat", package = package, reporter = reporter, 0.05) ..., load_package = "installed")
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)52: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), test_check("missSBM") 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), An irrecoverable exception occurred. R is aborting now ...
0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) })
30: eval(code, test_env)
31: eval(code, test_env)
32: 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)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: 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)
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))})
Traceback:
1: 8: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
2: 9: FUN(X[[i]], ...)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
3: 10: lapply(X = S, FUN = FUN, ...)FUN(X[[i]], ...)
4: 11: doTryCatch(return(expr), name, parentenv, handler)
lapply(seq_len(cores), inner.do)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 6:
tryCatchList(expr, classes, parentenv, handlers)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: 7: private$BMobject$estimate()
tryCatch(expr, error = function(e) {17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) call <- conditionCall(e)
if (!is.null(call)) {18: if (identical(call[[1L]], quote(doTryCatch))) eval(code, test_env) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)19: prefix <- paste("Error in", dcall, ": ")eval(code, test_env) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]20: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")withCallingHandlers({ eval(code, test_env) if (is.na(w)) new_expectations <- the$test_expectations > starting_expectations w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (snapshot_skipped) { type = "b") skip("On CRAN") if (w > LONG) } prefix <- paste0(prefix, "\n ") else if (!new_expectations && skip_on_empty) { } skip_empty() else prefix <- "Error : " } msg <- paste0(prefix, conditionMessage(e), "\n")}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { .Internal(seterrmessage(msg[1L])) skip(paste0("{", e$package, "} is not installed.")) if (!silent && isTRUE(getOption("show.error.messages"))) { } cat(msg, file = outFile)}, snapshot_on_cran = function(cnd) { .Internal(printDeferredWarnings()) } snapshot_skipped <<- TRUE invisible(structure(msg, class = "try-error", condition = e)) invokeRestart("muffle_cran_snapshot")})}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
8: 21: doTryCatch(return(expr), name, parentenv, handler)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
22: 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
23: 10: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...)
24: tryCatch(withCallingHandlers({11: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationslapply(seq_len(cores), inner.do) if (snapshot_skipped) {
skip("On CRAN")12: } else if (!new_expectations && skip_on_empty) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, skip_empty() mc.silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {13: if (on_cran()) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) skip(paste0("{", e$package, "} is not installed."))
}14: }, snapshot_on_cran = function(cnd) {.self$do_with_inits(inits, Q, reinitialization_effort) snapshot_skipped <<- TRUE
15: invokeRestart("muffle_cran_snapshot").self$estim_ascend(reinitialization_effort, changing_effort)}, skip = handle_skip, warning = handle_warning, message = handle_message,
16: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)private$BMobject$estimate()
25: 17: doWithOneRestart(return(expr), restart)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
26:
withOneRestart(expr, restarts[[1L]])18: eval(code, test_env)
27: 19: withRestarts(tryCatch(withCallingHandlers({eval(code, test_env)
eval(code, test_env)20: 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) { }}, 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_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {21: })doTryCatch(return(expr), name, parentenv, handler)
28: 22: test_code(code, parent.frame())tryCatchOne(expr, names, parentenv, handlers[[1L]])
29: 23: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", tryCatchList(expr, classes, parentenv, handlers) {
sampler_directed_nocov$rNetwork(store = TRUE)24: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, tryCatch(withCallingHandlers({ "bernoulli", TRUE) eval(code, test_env) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, new_expectations <- the$test_expectations > starting_expectations plot = FALSE)) if (snapshot_skipped) { mySBM_sbm$setModel(3) skip("On CRAN") net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) } cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, else if (!new_expectations && skip_on_empty) { clusterInit = cl) skip_empty() mySBM_missSBM$doVEM() } expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.1) if (on_cran()) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), skip(paste0("{", e$package, "} is not installed.")) 0.95) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, snapshot_on_cran = function(cnd) { 0.01) snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.1)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam),
0.2)25: expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95)doWithOneRestart(return(expr), restart) })
26: 30: withOneRestart(expr, restarts[[1L]])eval(code, test_env)
27: 31: withRestarts(tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
32: new_expectations <- the$test_expectations > starting_expectationswithCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations } 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()) { } 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), error = handle_fatal), invokeRestart("muffle_cran_snapshot") end_test = function() {}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt)
28: 33: test_code(code, parent.frame())doTryCatch(return(expr), name, parentenv, handler)
29: 34: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", tryCatchOne(expr, names, parentenv, handlers[[1L]]) {
35: sampler_directed_nocov$rNetwork(store = TRUE)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData,
"bernoulli", TRUE)36: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, tryCatch(withCallingHandlers({ plot = FALSE)) eval(code, test_env) mySBM_sbm$setModel(3) new_expectations <- the$test_expectations > starting_expectations net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) if (snapshot_skipped) { cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, skip("On CRAN") } clusterInit = cl) else if (!new_expectations && skip_on_empty) { mySBM_missSBM$doVEM() skip_empty() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.1)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (on_cran()) { 0.95) skip(paste0("{", e$package, "} is not installed.")) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), snapshot_skipped <<- TRUE 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), invokeRestart("muffle_cran_snapshot") 0.2)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.95)
})37:
doWithOneRestart(return(expr), restart)30:
eval(code, test_env)38:
withOneRestart(expr, restarts[[1L]])31: eval(code, test_env)
39: 32: 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) { 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), error = handle_fatal), 33: end_test = function() {doTryCatch(return(expr), name, parentenv, handler)
})34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 35: StopReporter$new())tryCatchList(expr, classes, parentenv, handlers)
36: 41: tryCatch(withCallingHandlers({source_file(path, env = env(env), desc = desc, shuffle = shuffle, eval(code, test_env) error_call = error_call) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {
skip("On CRAN") }42: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty()
}43: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed."))
}44: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")45: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
46: 37: tryCatchList(expr, classes, parentenv, handlers)doWithOneRestart(return(expr), restart)
47: 38: tryCatch(code, testthat_abort_reporter = function(cnd) {withOneRestart(expr, restarts[[1L]]) cat(conditionMessage(cnd), "\n")
NULL39: })withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)48: new_expectations <- the$test_expectations > starting_expectationswith_reporter(reporters$multi, lapply(test_paths, test_one_file, if (snapshot_skipped) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip("On CRAN")
}49: else if (!new_expectations && skip_on_empty) {test_files_serial(test_dir = test_dir, test_package = test_package, skip_empty() test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, } env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { desc = desc, load_package = load_package, shuffle = shuffle, skip(paste0("{", e$package, "} is not installed.")) error_call = error_call) }
}, snapshot_on_cran = function(cnd) {50: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")test_files(test_dir = path, test_paths = test_paths, test_package = package, }, skip = handle_skip, warning = handle_warning, message = handle_message, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), load_package = load_package, parallel = parallel, shuffle = shuffle) end_test = function() {
51: })test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 52: StopReporter$new())test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
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
Flavor: r-oldrel-macos-arm64