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