Last updated on 2026-09-26 00:50:36 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 89.36 | 356.78 | 446.14 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 58.53 | 247.84 | 306.37 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 59.00 | 243.15 | 302.15 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 248.05 | 312.05 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 450.00 | 541.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 83.11 | 346.95 | 430.06 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 90.56 | 343.79 | 434.35 | OK | |
| r-release-macos-arm64 | 1.1.0 | 17.00 | 92.00 | 109.00 | OK | |
| r-release-macos-x86_64 | 1.1.0 | 59.00 | 456.00 | 515.00 | OK | |
| r-release-windows-x86_64 | 1.1.0 | 98.00 | 361.00 | 459.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 18.00 | 109.00 | 127.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 | 115.00 | 501.00 | 616.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
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, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1)
Traceback:
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 1: 0.85)dispatcher(membership_name, membership_init$to_cc(), model_name, }) .self$network_to_cc(), TRUE)
30: 2: eval(code, test_env)FUN(X[[i]], ...)
31: 3: eval(code, test_env)lapply(X = S, FUN = FUN, ...)
32: 4: withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 5: if (snapshot_skipped) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip("On CRAN")
} 6: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty()
} 7: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatch(expr, error = function(e) { if (on_cran()) { call <- conditionCall(e) skip(paste0("{", e$package, "} is not installed.")) if (!is.null(call)) { } if (identical(call[[1L]], quote(doTryCatch))) }, snapshot_on_cran = function(cnd) { call <- sys.call(-4L) snapshot_skipped <<- TRUE dcall <- deparse(call, nlines = 1L) invokeRestart("muffle_cran_snapshot") prefix <- paste("Error in", dcall, ": ")}, skip = handle_skip, warning = handle_warning, message = handle_message, LONG <- 75L error = handle_error, interrupt = handle_interrupt) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")33: if (is.na(w)) doTryCatch(return(expr), name, parentenv, handler) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")34: if (w > LONG) tryCatchOne(expr, names, parentenv, handlers[[1L]]) prefix <- paste0(prefix, "\n ")
}35: else prefix <- "Error : "tryCatchList(expr, classes, parentenv, handlers) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))36: if (!silent && isTRUE(getOption("show.error.messages"))) {tryCatch(withCallingHandlers({ cat(msg, file = outFile) eval(code, test_env) .Internal(printDeferredWarnings()) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { invisible(structure(msg, class = "try-error", condition = e)) skip("On CRAN") }}) else if (!new_expectations && skip_on_empty) {
skip_empty() 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { 9: skip(paste0("{", e$package, "} is not installed."))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }
}, snapshot_on_cran = function(cnd) {10: snapshot_skipped <<- TRUEFUN(X[[i]], ...) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 11: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)lapply(seq_len(cores), inner.do)
37: 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, doWithOneRestart(return(expr), restart) mc.silent = TRUE)
38: 13: withOneRestart(expr, restarts[[1L]])parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))39:
withRestarts(tryCatch(withCallingHandlers({14: eval(code, test_env).self$do_with_inits(inits, Q, reinitialization_effort) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {15: skip("On CRAN").self$estim_ascend(reinitialization_effort, changing_effort) }
else if (!new_expectations && skip_on_empty) {16: skip_empty()private$BMobject$estimate() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {17: if (on_cran()) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) skip(paste0("{", e$package, "} is not installed."))
}18: }, snapshot_on_cran = function(cnd) {eval(code, test_env) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")19: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {20: })withCallingHandlers({
eval(code, test_env)40: new_expectations <- the$test_expectations > starting_expectationstest_code(code = exprs, env = env, reporter = get_reporter() %||% if (snapshot_skipped) { StopReporter$new()) skip("On CRAN")
}41: else if (!new_expectations && skip_on_empty) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip_empty() error_call = error_call) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {42: if (on_cran()) {FUN(X[[i]], ...) skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) {43: snapshot_skipped <<- TRUElapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)44:
doTryCatch(return(expr), name, parentenv, handler)21:
doTryCatch(return(expr), name, parentenv, handler)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])46:
tryCatchList(expr, classes, parentenv, handlers)23:
tryCatchList(expr, classes, parentenv, handlers)47:
tryCatch(code, testthat_abort_reporter = function(cnd) {24: cat(conditionMessage(cnd), "\n")tryCatch(withCallingHandlers({ NULL eval(code, test_env)}) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {48: skip("On CRAN")with_reporter(reporters$multi, lapply(test_paths, test_one_file, } env = env, desc = desc, shuffle = shuffle, error_call = error_call)) else if (!new_expectations && skip_on_empty) {
skip_empty()49: }test_files_serial(test_dir = test_dir, test_package = test_package, }, expectation = handle_expectation, packageNotFoundError = function(e) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, if (on_cran()) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip(paste0("{", e$package, "} is not installed.")) desc = desc, load_package = load_package, shuffle = shuffle, } error_call = error_call)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE50: 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, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)25:
doWithOneRestart(return(expr), restart)51:
test_dir("testthat", package = package, reporter = reporter, 26: ..., load_package = "installed")withOneRestart(expr, restarts[[1L]])
52: 27: test_check("missSBM")withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)An irrecoverable exception occurred. R is aborting now ...
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, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_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-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)
Traceback:
1:
12: dispatcher(membership_name, membership_init$to_cc(), model_name, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) .self$network_to_cc(), TRUE)
13: 2: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, FUN(X[[i]], ...) verbose = (verbosity > 4))
3: 14: lapply(X = S, FUN = FUN, ...).self$do_with_inits(inits, Q, reinitialization_effort)
4: 15: doTryCatch(return(expr), name, parentenv, handler).self$estim_ascend(reinitialization_effort, changing_effort)
5: 16: tryCatchOne(expr, names, parentenv, handlers[[1L]])private$BMobject$estimate()
6: 17: tryCatchList(expr, classes, parentenv, handlers)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
7: 18: tryCatch(expr, error = function(e) {eval(code, test_env) call <- conditionCall(e)
if (!is.null(call)) {19: if (identical(call[[1L]], quote(doTryCatch))) eval(code, test_env) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)20: prefix <- paste("Error in", dcall, ": ")withCallingHandlers({ LONG <- 75L eval(code, test_env) sm <- strsplit(conditionMessage(e), "\n")[[1L]] new_expectations <- the$test_expectations > starting_expectations w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (snapshot_skipped) { if (is.na(w)) skip("On CRAN") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } type = "b") else if (!new_expectations && skip_on_empty) { if (w > LONG) skip_empty() prefix <- paste0(prefix, "\n ") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else prefix <- "Error : " if (on_cran()) { msg <- paste0(prefix, conditionMessage(e), "\n") skip(paste0("{", e$package, "} is not installed.")) .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE cat(msg, file = outFile) invokeRestart("muffle_cran_snapshot") .Internal(printDeferredWarnings())}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt) invisible(structure(msg, class = "try-error", condition = e))
})21:
doTryCatch(return(expr), name, parentenv, handler) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)22:
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: 11: tryCatch(withCallingHandlers({lapply(seq_len(cores), inner.do) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations12: if (snapshot_skipped) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, skip("On CRAN") mc.silent = TRUE) }
else if (!new_expectations && skip_on_empty) {13: skip_empty()parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4))}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {14: skip(paste0("{", e$package, "} is not installed.")).self$do_with_inits(inits, Q, reinitialization_effort) }
}, snapshot_on_cran = function(cnd) {15: snapshot_skipped <<- TRUE.self$estim_ascend(reinitialization_effort, changing_effort) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 16: private$BMobject$estimate() error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
17: 25: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
doWithOneRestart(return(expr), restart)18:
eval(code, test_env)26:
withOneRestart(expr, restarts[[1L]])19:
eval(code, test_env)27:
withRestarts(tryCatch(withCallingHandlers({20: eval(code, test_env)withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt) })
21: 28: doTryCatch(return(expr), name, parentenv, handler)test_code(code, parent.frame())
22: 29: tryCatchOne(expr, names, parentenv, handlers[[1L]])
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 23: {tryCatchList(expr, classes, parentenv, handlers) sampler_directed_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, 24: "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 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]] else if (!new_expectations && skip_on_empty) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, skip_empty() clusterInit = cl, covarList = covarList_directed) } mySBM_missSBM$doVEM(trace = TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.8)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), snapshot_skipped <<- TRUE 0.05) invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.1) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships),
0.85)25: })doWithOneRestart(return(expr), restart)
30: 26: eval(code, test_env)withOneRestart(expr, restarts[[1L]])
31: 27: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)32: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { else if (!new_expectations && skip_on_empty) { skip("On CRAN") skip_empty() } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), snapshot_skipped <<- TRUE end_test = function() { invokeRestart("muffle_cran_snapshot") })}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)28:
test_code(code, parent.frame())33:
doTryCatch(return(expr), name, parentenv, handler)29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 34: {tryCatchOne(expr, names, parentenv, handlers[[1L]]) sampler_directed_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, 35: "bernoulli", TRUE, covarList = covarList_directed)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))36: mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, tryCatch(withCallingHandlers({ covariates = covarList_directed) eval(code, test_env) cls <- net$clustering(1:(2 * Q)) new_expectations <- the$test_expectations > starting_expectations cl <- cls[[Q]] if (snapshot_skipped) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, skip("On CRAN") clusterInit = cl, covarList = covarList_directed) } mySBM_missSBM$doVEM(trace = TRUE) else if (!new_expectations && skip_on_empty) { 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.8) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.05)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), snapshot_skipped <<- TRUE 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, }) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: 30: doWithOneRestart(return(expr), restart)eval(code, test_env)
38: 31: withOneRestart(expr, restarts[[1L]])eval(code, test_env)
39: 32: withRestarts(tryCatch(withCallingHandlers({withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt) })
40: 33: test_code(code = exprs, env = env, reporter = get_reporter() %||% doTryCatch(return(expr), name, parentenv, handler) StopReporter$new())
41: 34: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error_call = error_call)
35:
tryCatchList(expr, classes, parentenv, handlers)42:
FUN(X[[i]], ...)36:
tryCatch(withCallingHandlers({43: eval(code, test_env)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, new_expectations <- the$test_expectations > starting_expectations error_call = error_call) if (snapshot_skipped) {
skip("On CRAN")44: } else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty()
}45: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))46: }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE47: invokeRestart("muffle_cran_snapshot")tryCatch(code, testthat_abort_reporter = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) cat(conditionMessage(cnd), "\n")
NULL37: doWithOneRestart(return(expr), restart)})
38: 48: withOneRestart(expr, restarts[[1L]])with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))39: withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)49: new_expectations <- the$test_expectations > starting_expectationstest_files_serial(test_dir = test_dir, test_package = test_package, if (snapshot_skipped) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, skip("On CRAN") env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, } desc = desc, load_package = load_package, shuffle = shuffle, else if (!new_expectations && skip_on_empty) { error_call = error_call) skip_empty()
}50: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_files(test_dir = path, test_paths = test_paths, test_package = package, if (on_cran()) { reporter = reporter, load_helpers = load_helpers, env = env, skip(paste0("{", e$package, "} is not installed.")) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, } load_package = load_package, parallel = parallel, shuffle = shuffle)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE51: invokeRestart("muffle_cran_snapshot")test_dir("testthat", package = package, reporter = reporter, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), ..., load_package = "installed") end_test = function() {
})52:
test_check("missSBM")40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% An irrecoverable exception occurred. R is aborting now ...
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.")) }}, 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, undirected, no covariate", { sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)
Traceback:
1: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), dispatcher(membership_name, membership_init$to_cc(), model_name, 0.01) .self$network_to_cc(), TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean),
0.05) 2: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), FUN(X[[i]], ...)
0.95) }) 3:
30: lapply(X = S, FUN = FUN, ...)eval(code, test_env)
4: 31: doTryCatch(return(expr), name, parentenv, handler)eval(code, test_env)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])32:
withCallingHandlers({ 6: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 7: tryCatch(expr, error = function(e) { call <- conditionCall(e) skip("On CRAN") if (!is.null(call)) { } 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, ": ") LONG <- 75L}, expectation = handle_expectation, packageNotFoundError = function(e) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (on_cran()) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") skip(paste0("{", e$package, "} is not installed.")) if (is.na(w)) } w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], }, snapshot_on_cran = function(cnd) { type = "b") snapshot_skipped <<- TRUE if (w > LONG) invokeRestart("muffle_cran_snapshot") prefix <- paste0(prefix, "\n ")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")33: .Internal(seterrmessage(msg[1L]))doTryCatch(return(expr), name, parentenv, handler) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)34: .Internal(printDeferredWarnings())tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
invisible(structure(msg, class = "try-error", condition = e))35: })
8: tryCatchList(expr, classes, parentenv, handlers)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)36:
tryCatch(withCallingHandlers({ 9: eval(code, test_env)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {10: skip("On CRAN")FUN(X[[i]], ...) }
else if (!new_expectations && skip_on_empty) {11: skip_empty()lapply(seq_len(cores), inner.do) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {12: skip(paste0("{", e$package, "} is not installed."))parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, } mc.silent = TRUE)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE13: invokeRestart("muffle_cran_snapshot")parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, }, skip = handle_skip, warning = handle_warning, message = handle_message, verbose = (verbosity > 4))
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)14:
.self$do_with_inits(inits, Q, reinitialization_effort)37:
doWithOneRestart(return(expr), restart)15:
.self$estim_ascend(reinitialization_effort, changing_effort)38:
withOneRestart(expr, restarts[[1L]])16:
private$BMobject$estimate()39:
withRestarts(tryCatch(withCallingHandlers({17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {18: skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {19: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {20: if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip_empty() end_test = function() { } })}, expectation = handle_expectation, packageNotFoundError = function(e) {
40: if (on_cran()) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip(paste0("{", e$package, "} is not installed.")) StopReporter$new()) }
}, snapshot_on_cran = function(cnd) {41: snapshot_skipped <<- TRUEsource_file(path, env = env(env), desc = desc, shuffle = shuffle, 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]], ...)21:
doTryCatch(return(expr), name, parentenv, handler)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 22: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]])
44: 23: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
45: 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(withCallingHandlers({
eval(code, test_env)46: new_expectations <- the$test_expectations > starting_expectationstryCatchList(expr, classes, parentenv, handlers) if (snapshot_skipped) {
skip("On CRAN")47: }tryCatch(code, testthat_abort_reporter = function(cnd) { else if (!new_expectations && skip_on_empty) { cat(conditionMessage(cnd), "\n") skip_empty() NULL }})}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {48: skip(paste0("{", e$package, "} is not installed."))with_reporter(reporters$multi, lapply(test_paths, test_one_file, } env = env, desc = desc, shuffle = shuffle, error_call = error_call))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE49: invokeRestart("muffle_cran_snapshot")test_files_serial(test_dir = test_dir, test_package = test_package, }, skip = handle_skip, warning = handle_warning, message = handle_message, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 25: error_call = error_call)doWithOneRestart(return(expr), restart)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 26: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, withOneRestart(expr, restarts[[1L]]) load_package = load_package, parallel = parallel, shuffle = shuffle)
27: 51: test_dir("testthat", package = package, reporter = reporter, withRestarts(tryCatch(withCallingHandlers({ ..., load_package = "installed") eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations52: if (snapshot_skipped) {test_check("missSBM") skip("On CRAN")
}An irrecoverable exception occurred. R is aborting now ...
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, undirected, no covariate", { sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 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)
Traceback:
5: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, tryCatchOne(expr, names, parentenv, handlers[[1L]])
.self$network_to_cc(), TRUE) 6:
tryCatchList(expr, classes, parentenv, handlers) 2:
FUN(X[[i]], ...) 7:
tryCatch(expr, error = function(e) { 3: call <- conditionCall(e)lapply(X = S, FUN = FUN, ...) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 4: call <- sys.call(-4L)doTryCatch(return(expr), name, parentenv, handler) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ") 5: LONG <- 75LtryCatchOne(expr, names, parentenv, handlers[[1L]]) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 6: if (is.na(w)) tryCatchList(expr, classes, parentenv, handlers) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")
if (w > LONG) 7: prefix <- paste0(prefix, "\n ")tryCatch(expr, error = function(e) { } call <- conditionCall(e) else prefix <- "Error : " if (!is.null(call)) { msg <- paste0(prefix, conditionMessage(e), "\n") if (identical(call[[1L]], quote(doTryCatch))) .Internal(seterrmessage(msg[1L])) call <- sys.call(-4L) if (!silent && isTRUE(getOption("show.error.messages"))) { dcall <- deparse(call, nlines = 1L) cat(msg, file = outFile) prefix <- paste("Error in", dcall, ": ") .Internal(printDeferredWarnings()) LONG <- 75L } sm <- strsplit(conditionMessage(e), "\n")[[1L]] invisible(structure(msg, class = "try-error", condition = e)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 8: type = "b")try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (w > LONG)
prefix <- paste0(prefix, "\n ") 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")10: .Internal(seterrmessage(msg[1L]))FUN(X[[i]], ...) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)11: .Internal(printDeferredWarnings())lapply(seq_len(cores), inner.do) }
invisible(structure(msg, class = "try-error", condition = e))12: })parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
13: 9: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) verbose = (verbosity > 4))
10: 14: FUN(X[[i]], ...).self$do_with_inits(inits, Q, reinitialization_effort)
11: 15: lapply(seq_len(cores), inner.do).self$estim_ascend(reinitialization_effort, changing_effort)
12: 16: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, private$BMobject$estimate() mc.silent = TRUE)
17: 13: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))18:
eval(code, test_env)14:
.self$do_with_inits(inits, Q, reinitialization_effort)19:
eval(code, test_env)15:
.self$estim_ascend(reinitialization_effort, changing_effort)20:
withCallingHandlers({16: eval(code, test_env)private$BMobject$estimate() new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {17: skip("On CRAN")mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }
else if (!new_expectations && skip_on_empty) {18: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {19: if (on_cran()) {eval(code, test_env) 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) }
else if (!new_expectations && skip_on_empty) {21: skip_empty()doTryCatch(return(expr), name, parentenv, handler) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {22: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}23: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")24: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations21: if (snapshot_skipped) {doTryCatch(return(expr), name, parentenv, handler) skip("On CRAN")
}22: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty()
}23: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }24: }, snapshot_on_cran = function(cnd) {tryCatch(withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip("On CRAN")
}25: else if (!new_expectations && skip_on_empty) {doWithOneRestart(return(expr), restart) skip_empty()
}26: }, expectation = handle_expectation, packageNotFoundError = function(e) {withOneRestart(expr, restarts[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))27: }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)
}26: }, expectation = handle_expectation, packageNotFoundError = function(e) {withOneRestart(expr, restarts[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))27: }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, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) {
skip_empty()28: }test_code(code, parent.frame())}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {29: skip(paste0("{", e$package, "} is not installed."))test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", } {}, snapshot_on_cran = function(cnd) { sampler_directed_nocov$rNetwork(store = TRUE) snapshot_skipped <<- TRUE mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, invokeRestart("muffle_cran_snapshot") "bernoulli", TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), plot = FALSE)) end_test = function() { mySBM_sbm$setModel(3) }) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)
cl <- net$clustering(3)[[1]]28: mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, test_code(code, parent.frame()) clusterInit = cl)
mySBM_missSBM$doVEM()29: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { 0.1) sampler_directed_nocov$rNetwork(store = TRUE) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, 0.95) "bernoulli", TRUE) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 0.01) plot = FALSE)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), mySBM_sbm$setModel(3) 0.1) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), cl <- net$clustering(3)[[1]] 0.2) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), clusterInit = cl) 0.95) mySBM_missSBM$doVEM() }) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.1)30: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), eval(code, test_env) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 31: eval(code, test_env) 0.01)
32: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1)withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), eval(code, test_env) 0.2) new_expectations <- the$test_expectations > starting_expectations expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), if (snapshot_skipped) { 0.95) skip("On CRAN") }) }
else if (!new_expectations && skip_on_empty) { skip_empty()30: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {31: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
}, snapshot_on_cran = function(cnd) {32: snapshot_skipped <<- TRUEwithCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt)
if (snapshot_skipped) {33: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) }
else if (!new_expectations && skip_on_empty) {34: skip_empty()tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {35: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) skip(paste0("{", e$package, "} is not installed."))
}36: }, snapshot_on_cran = function(cnd) {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) 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: }tryCatchList(expr, classes, parentenv, handlers)
}, snapshot_on_cran = function(cnd) {36: snapshot_skipped <<- TRUEtryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (snapshot_skipped) {
skip("On CRAN")37: }doWithOneRestart(return(expr), restart)
else if (!new_expectations && skip_on_empty) {38: skip_empty()withOneRestart(expr, restarts[[1L]]) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {39: 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) { 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()
}37: }, expectation = handle_expectation, packageNotFoundError = function(e) {doWithOneRestart(return(expr), restart) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))38: }withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE39: invokeRestart("muffle_cran_snapshot")withRestarts(tryCatch(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 end_test = function() { if (snapshot_skipped) { }) skip("On CRAN")
}40: else if (!new_expectations && skip_on_empty) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip_empty() StopReporter$new()) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {41: if (on_cran()) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip(paste0("{", e$package, "} is not installed.")) error_call = error_call) }
}, snapshot_on_cran = function(cnd) {42: FUN(X[[i]], ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")43: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), error_call = error_call) end_test = function() {
})44:
doTryCatch(return(expr), name, parentenv, handler)40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 45: StopReporter$new())tryCatchOne(expr, names, parentenv, handlers[[1L]])
41: 46: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers) error_call = error_call)
47: 42: tryCatch(code, testthat_abort_reporter = function(cnd) {FUN(X[[i]], ...) cat(conditionMessage(cnd), "\n")
NULL43: })lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 44: env = env, desc = desc, shuffle = shuffle, error_call = error_call))doTryCatch(return(expr), name, parentenv, handler)
49: 45: test_files_serial(test_dir = test_dir, test_package = test_package, tryCatchOne(expr, names, parentenv, handlers[[1L]]) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 46: desc = desc, load_package = load_package, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers) error_call = error_call)
47: 50: tryCatch(code, testthat_abort_reporter = function(cnd) {test_files(test_dir = path, test_paths = test_paths, test_package = package, cat(conditionMessage(cnd), "\n") reporter = reporter, load_helpers = load_helpers, env = env, NULL stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }) load_package = load_package, parallel = parallel, shuffle = shuffle)
51: 48: test_dir("testthat", package = package, reporter = reporter, with_reporter(reporters$multi, lapply(test_paths, test_one_file, ..., load_package = "installed") env = env, desc = desc, shuffle = shuffle, error_call = error_call))
52: 49: test_check("missSBM")test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, An irrecoverable exception occurred. R is aborting now ...
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