Last updated on 2026-09-30 01:55:51 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 86.89 | 357.64 | 444.53 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 56.32 | 242.68 | 299.00 | 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 | 63.00 | 247.50 | 310.50 | 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 | 80.87 | 341.38 | 422.25 | 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 | 20.00 | 104.00 | 124.00 | ERROR | |
| r-oldrel-macos-x86_64 | 1.1.0 | 59.00 | 679.00 | 738.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.0 | 119.00 | 513.00 | 632.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/30s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, 1: .self$network_to_cc(), TRUE)dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
2: 3: FUN(X[[i]], ...)lapply(X = S, FUN = FUN, ...)
3: 4: lapply(X = S, FUN = FUN, ...)doTryCatch(return(expr), name, parentenv, handler)
5: 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])doTryCatch(return(expr), name, parentenv, handler)
6:
tryCatchList(expr, classes, parentenv, handlers) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: 7: tryCatchList(expr, classes, parentenv, handlers)tryCatch(expr, error = function(e) {
call <- conditionCall(e) 7: if (!is.null(call)) {tryCatch(expr, error = function(e) { if (identical(call[[1L]], quote(doTryCatch))) call <- conditionCall(e) call <- sys.call(-4L) if (!is.null(call)) { dcall <- deparse(call, nlines = 1L) if (identical(call[[1L]], quote(doTryCatch))) prefix <- paste("Error in", dcall, ": ") call <- sys.call(-4L) LONG <- 75L dcall <- deparse(call, nlines = 1L) sm <- strsplit(conditionMessage(e), "\n")[[1L]] prefix <- paste("Error in", dcall, ": ") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") LONG <- 75L if (is.na(w)) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") type = "b") if (is.na(w)) if (w > LONG) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], prefix <- paste0(prefix, "\n ") type = "b") } if (w > LONG) else prefix <- "Error : " prefix <- paste0(prefix, "\n ") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else prefix <- "Error : " if (!silent && isTRUE(getOption("show.error.messages"))) { msg <- paste0(prefix, conditionMessage(e), "\n") cat(msg, file = outFile) .Internal(seterrmessage(msg[1L])) .Internal(printDeferredWarnings()) } if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) invisible(structure(msg, class = "try-error", condition = e)) .Internal(printDeferredWarnings())}) }
invisible(structure(msg, class = "try-error", condition = e)) 8: })
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
8: 9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: 10: FUN(X[[i]], ...)FUN(X[[i]], ...)
11: 11: lapply(seq_len(cores), inner.do)lapply(seq_len(cores), inner.do)
12: 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) mc.silent = TRUE)
13: 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) verbose = (verbosity > 4))
14: 14: .self$do_with_inits(inits, Q, reinitialization_effort).self$do_with_inits(inits, Q, reinitialization_effort)
15: 15: .self$estim_ascend(reinitialization_effort, changing_effort).self$estim_ascend(reinitialization_effort, changing_effort)
16: 16: private$BMobject$estimate()private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: 17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
19: 18: eval(code, test_env)eval(code, test_env)
20: 19: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN") }20: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { skip("On CRAN") if (on_cran()) { } else if (!new_expectations && skip_on_empty) { 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 invokeRestart("muffle_cran_snapshot")}, 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) {
snapshot_skipped <<- TRUE21: doTryCatch(return(expr), name, parentenv, handler)
22: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)23:
tryCatchList(expr, classes, parentenv, handlers)21:
doTryCatch(return(expr), name, parentenv, handler)24:
tryCatch(withCallingHandlers({22: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
new_expectations <- the$test_expectations > starting_expectations23: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN")
}24: else if (!new_expectations && skip_on_empty) {tryCatch(withCallingHandlers({ skip_empty() } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { skip("On CRAN") } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: if (on_cran()) {doWithOneRestart(return(expr), restart) skip(paste0("{", e$package, "} is not installed."))
}26: withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE27: 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
if (snapshot_skipped) {25: skip("On CRAN")doWithOneRestart(return(expr), restart)
}26: else if (!new_expectations && skip_on_empty) {withOneRestart(expr, restarts[[1L]])
skip_empty()27: }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) { }}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { }) skip(paste0("{", e$package, "} is not installed."))
}28: }, snapshot_on_cran = function(cnd) {test_code(code, parent.frame())
snapshot_skipped <<- TRUE29: invokeRestart("muffle_cran_snapshot")test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", }, skip = handle_skip, warning = handle_warning, message = handle_message, { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), sampler_undirected_cov$rNetwork(store = TRUE) end_test = function() { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, }) "bernoulli", FALSE, covarList = covarList_undirected)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 28: plot = FALSE))test_code(code, parent.frame()) mySBM_sbm$setModel(Q)
29: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", { cls <- net$clustering(1:(2 * Q)) sampler_undirected_cov$rNetwork(store = TRUE) cl <- cls[[Q]] mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, "bernoulli", FALSE, covarList = covarList_undirected) clusterInit = cl, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_missSBM$doVEM() plot = FALSE)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_sbm$setModel(Q) 0.05) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), covariates = covarList_undirected) 0.8) cls <- net$clustering(1:(2 * Q)) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), cl <- cls[[Q]] 0.01) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM$doVEM() 0.1) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.05) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) 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), 30: 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), eval(code, test_env) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 31: 0.85) })eval(code, test_env)
30: 32: eval(code, test_env)withCallingHandlers({
eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}32: else if (!new_expectations && skip_on_empty) {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.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt) skip(paste0("{", e$package, "} is not installed.")) }
}, snapshot_on_cran = function(cnd) {33: 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: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])36:
35: tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) { skip("On CRAN")tryCatch(withCallingHandlers({ } else if (!new_expectations && skip_on_empty) { skip_empty() eval(code, test_env) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE 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) {37: if (on_cran()) {doWithOneRestart(return(expr), restart)
skip(paste0("{", e$package, "} is not installed."))38: withOneRestart(expr, restarts[[1L]]) }
}, snapshot_on_cran = function(cnd) {39: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, 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_expectations37: if (snapshot_skipped) {doWithOneRestart(return(expr), restart) skip("On CRAN")
}38: else if (!new_expectations && skip_on_empty) {withOneRestart(expr, restarts[[1L]]) skip_empty()
}39: 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() %||% StopReporter$new()) snapshot_skipped <<- TRUE
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) })
40: 42: test_code(code = exprs, env = env, reporter = get_reporter() %||% FUN(X[[i]], ...) StopReporter$new())
43: 41: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) error_call = error_call)
44: 42: doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 46: error_call = error_call)tryCatchList(expr, classes, parentenv, handlers)
44: 47: doTryCatch(return(expr), name, parentenv, handler)
tryCatch(code, testthat_abort_reporter = function(cnd) {45: cat(conditionMessage(cnd), "\n")tryCatchOne(expr, names, parentenv, handlers[[1L]]) NULL})
46: 48: tryCatchList(expr, classes, parentenv, handlers)with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
47: 49: tryCatch(code, testthat_abort_reporter = function(cnd) {test_files_serial(test_dir = test_dir, test_package = test_package, cat(conditionMessage(cnd), "\n") test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, NULL 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)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 49: reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_files_serial(test_dir = test_dir, test_package = test_package, load_package = load_package, parallel = parallel, shuffle = shuffle) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
51: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_dir("testthat", package = package, reporter = reporter, desc = desc, load_package = load_package, shuffle = shuffle, ..., load_package = "installed") error_call = error_call)
52: 50: test_check("missSBM")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, An irrecoverable exception occurred. R is aborting now ...
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:
Traceback:
lapply(X = S, FUN = FUN, ...)
1: 4: dispatcher(membership_name, membership_init$to_cc(), model_name, doTryCatch(return(expr), name, parentenv, handler) .self$network_to_cc(), TRUE)
5: 2: tryCatchOne(expr, names, parentenv, handlers[[1L]])FUN(X[[i]], ...)
6: 3: tryCatchList(expr, classes, parentenv, handlers)lapply(X = S, FUN = FUN, ...)
7: 4: tryCatch(expr, error = function(e) {doTryCatch(return(expr), name, parentenv, handler) call <- conditionCall(e)
if (!is.null(call)) { 5: if (identical(call[[1L]], quote(doTryCatch))) tryCatchOne(expr, names, parentenv, handlers[[1L]]) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L) 6: prefix <- paste("Error in", dcall, ": ")tryCatchList(expr, classes, parentenv, handlers) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]] 7: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatch(expr, error = function(e) { if (is.na(w)) call <- conditionCall(e) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (!is.null(call)) { type = "b") if (w > LONG) if (identical(call[[1L]], quote(doTryCatch))) prefix <- paste0(prefix, "\n ") call <- sys.call(-4L) } dcall <- deparse(call, nlines = 1L) else prefix <- "Error : " prefix <- paste("Error in", dcall, ": ") msg <- paste0(prefix, conditionMessage(e), "\n") LONG <- 75L .Internal(seterrmessage(msg[1L])) sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (!silent && isTRUE(getOption("show.error.messages"))) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") cat(msg, file = outFile) if (is.na(w)) .Internal(printDeferredWarnings()) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } type = "b") invisible(structure(msg, class = "try-error", condition = e)) if (w > LONG) }) prefix <- paste0(prefix, "\n ")
} 8: else prefix <- "Error : "try(lapply(X = S, FUN = FUN, ...), silent = TRUE) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L])) 9: if (!silent && isTRUE(getOption("show.error.messages"))) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) cat(msg, file = outFile)
.Internal(printDeferredWarnings())10: }FUN(X[[i]], ...) invisible(structure(msg, class = "try-error", condition = e))
})11:
lapply(seq_len(cores), inner.do) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 9: mc.silent = TRUE)
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 10: verbose = (verbosity > 4))FUN(X[[i]], ...)
14: 11: .self$do_with_inits(inits, Q, reinitialization_effort)lapply(seq_len(cores), inner.do)
12: 15: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, .self$estim_ascend(reinitialization_effort, changing_effort) mc.silent = TRUE)
13: 16: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, private$BMobject$estimate() verbose = (verbosity > 4))
17: 14: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)).self$do_with_inits(inits, Q, reinitialization_effort)
18: 15: eval(code, test_env).self$estim_ascend(reinitialization_effort, changing_effort)
19: 16: eval(code, test_env)private$BMobject$estimate()
20: 17: withCallingHandlers({mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations18: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}19: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
}20: }, expectation = handle_expectation, packageNotFoundError = function(e) {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) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {21: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed."))
}22: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")23: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt)
24: 21: tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler)
eval(code, test_env)22: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")23: }tryCatchList(expr, classes, parentenv, handlers)
else if (!new_expectations && skip_on_empty) {24: skip_empty()tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))25: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE26: invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)27:
25: withRestarts(tryCatch(withCallingHandlers({doWithOneRestart(return(expr), restart) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations26: if (snapshot_skipped) {withOneRestart(expr, restarts[[1L]]) skip("On CRAN")
}27: else if (!new_expectations && skip_on_empty) {withRestarts(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.")) } } 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), error = handle_fatal), } end_test = function() { })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE28: invokeRestart("muffle_cran_snapshot")test_code(code, parent.frame())}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 29: end_test = function() {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", }) {
sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, 28: "bernoulli", TRUE, covarList = covarList_directed)test_code(code, parent.frame()) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))29: mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", covariates = covarList_directed) { cls <- net$clustering(1:(2 * Q)) sampler_directed_cov$rNetwork(store = TRUE) cl <- cls[[Q]] mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, "bernoulli", TRUE, covarList = covarList_directed) clusterInit = cl, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_missSBM$doVEM(trace = TRUE) plot = FALSE)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_sbm$setModel(Q) 0.1) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), cls <- net$clustering(1:(2 * Q)) 0.8) cl <- cls[[Q]] expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), clusterInit = cl, covarList = covarList_directed) 0.1) mySBM_missSBM$doVEM(trace = TRUE) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.85) 0.1) }) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)30: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.05)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 31: 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85)eval(code, test_env) })
32: 30: withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations31: eval(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) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt) skip(paste0("{", e$package, "} is not installed."))
}33: doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE34: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)35: tryCatchList(expr, classes, parentenv, handlers)
33: 36: doTryCatch(return(expr), name, parentenv, handler)tryCatch(withCallingHandlers({
eval(code, test_env)34: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")35: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) {
skip_empty()36: }tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {37: if (on_cran()) {doWithOneRestart(return(expr), restart) 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
if (snapshot_skipped) {37: skip("On CRAN")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 if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() {}, expectation = handle_expectation, packageNotFoundError = function(e) { }) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))40: }test_code(code = exprs, env = env, reporter = get_reporter() %||% }, snapshot_on_cran = function(cnd) { StopReporter$new()) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")41: }, skip = handle_skip, warning = handle_warning, message = handle_message, source_file(path, env = env(env), desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), error_call = error_call) end_test = function() {
})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)
42: 45: FUN(X[[i]], ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
43: 46: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers)
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: 47: test_files_serial(test_dir = test_dir, test_package = test_package, tryCatch(code, testthat_abort_reporter = function(cnd) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, cat(conditionMessage(cnd), "\n") env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, NULL error_call = error_call)})
50: 48: test_files(test_dir = path, test_paths = test_paths, test_package = package, with_reporter(reporters$multi, lapply(test_paths, test_one_file, reporter = reporter, load_helpers = load_helpers, env = env, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)49:
test_files_serial(test_dir = test_dir, test_package = test_package, 51: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, test_dir("testthat", package = package, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, ..., load_package = "installed") desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)52:
test_check("missSBM")50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, An irrecoverable exception occurred. R is aborting now ...
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) {
Traceback:
1: call <- conditionCall(e)dispatcher(membership_name, membership_init$to_cc(), model_name, if (!is.null(call)) { .self$network_to_cc(), TRUE) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L) 2: dcall <- deparse(call, nlines = 1L)FUN(X[[i]], ...) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L 3: sm <- strsplit(conditionMessage(e), "\n")[[1L]]lapply(X = S, FUN = FUN, ...) 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))) })
8: call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L 9: sm <- strsplit(conditionMessage(e), "\n")[[1L]]sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")10: if (is.na(w)) FUN(X[[i]], ...) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")11: if (w > LONG) lapply(seq_len(cores), inner.do) prefix <- paste0(prefix, "\n ")
}12: else prefix <- "Error : "parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, msg <- paste0(prefix, conditionMessage(e), "\n") mc.silent = TRUE) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {13: cat(msg, file = outFile)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, .Internal(printDeferredWarnings()) verbose = (verbosity > 4)) }
invisible(structure(msg, class = "try-error", condition = e))14: }).self$do_with_inits(inits, Q, reinitialization_effort)
8: 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE).self$estim_ascend(reinitialization_effort, changing_effort)
9: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))private$BMobject$estimate()
10: 17: FUN(X[[i]], ...)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
11: 18: lapply(seq_len(cores), inner.do)eval(code, test_env)
12: 19: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, eval(code, test_env) mc.silent = TRUE)
20: 13: 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: withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]])
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) {}, 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}, 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), error = handle_fatal)tryCatchOne(expr, names, parentenv, handlers[[1L]])
25: 23: doWithOneRestart(return(expr), restart)tryCatchList(expr, classes, parentenv, handlers)
24: 26: tryCatch(withCallingHandlers({withOneRestart(expr, restarts[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations27: if (snapshot_skipped) {withRestarts(tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")25: }, skip = handle_skip, warning = handle_warning, message = handle_message, doWithOneRestart(return(expr), restart) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {26: })withOneRestart(expr, restarts[[1L]])
28: 27: test_code(code, parent.frame())withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)29: new_expectations <- the$test_expectations > starting_expectationstest_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", if (snapshot_skipped) { { skip("On CRAN") sampler_undirected_nocov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, else if (!new_expectations && skip_on_empty) { "bernoulli", FALSE) skip_empty() mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) if (on_cran()) { cl <- net$clustering(3)[[1]] skip(paste0("{", e$package, "} is not installed.")) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, } clusterInit = cl)}, snapshot_on_cran = function(cnd) { mySBM_missSBM$doVEM() snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.05)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.95) end_test = function() { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 28: 0.05)test_code(code, parent.frame()) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships),
0.95)29: })test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate",
{ sampler_undirected_nocov$rNetwork(store = TRUE)30: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, eval(code, test_env) "bernoulli", FALSE)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 31: plot = FALSE))eval(code, test_env) mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)32: cl <- net$clustering(3)[[1]]withCallingHandlers({ mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, eval(code, test_env) clusterInit = cl) new_expectations <- the$test_expectations > starting_expectations mySBM_missSBM$doVEM() if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip("On CRAN") 0.05) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), else if (!new_expectations && skip_on_empty) { skip_empty() } 0.95)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), if (on_cran()) { 0.01) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), } 0.05)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), invokeRestart("muffle_cran_snapshot") 0.95)}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt)
30: 33: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler)
31: 34: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
32: 35: withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) {tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() } skip("On CRAN") } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { }}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
33: 37: doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart)
34: 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])withOneRestart(expr, restarts[[1L]])
35: 39: tryCatchList(expr, classes, parentenv, handlers)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)36: new_expectations <- the$test_expectations > starting_expectationstryCatch(withCallingHandlers({ eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { 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 }}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) })
37: 40: doWithOneRestart(return(expr), restart)test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())38:
withOneRestart(expr, restarts[[1L]])41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 39: error_call = error_call)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)
42: new_expectations <- the$test_expectations > starting_expectationsFUN(X[[i]], ...) if (snapshot_skipped) {
skip("On CRAN")43: }lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, else if (!new_expectations && skip_on_empty) { error_call = error_call) skip_empty()
}44: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))45: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE46: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)
}, skip = handle_skip, warning = handle_warning, message = handle_message, 47: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), tryCatch(code, testthat_abort_reporter = function(cnd) { end_test = function() { cat(conditionMessage(cnd), "\n") }) NULL
})40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 48: StopReporter$new())with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 49: error_call = error_call)test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 42: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, FUN(X[[i]], ...) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 50: error_call = error_call)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 44: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, doTryCatch(return(expr), name, parentenv, handler) load_package = load_package, parallel = parallel, shuffle = shuffle)
45: 51: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")46:
tryCatchList(expr, classes, parentenv, handlers)52:
test_check("missSBM")47:
tryCatch(code, testthat_abort_reporter = function(cnd) {An irrecoverable exception occurred. R is aborting now ...
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
Traceback:
sm <- strsplit(conditionMessage(e), "\n")[[1L]] 1: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")dispatcher(membership_name, membership_init$to_cc(), model_name, if (is.na(w)) .self$network_to_cc(), TRUE) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b") if (w > LONG) 2: prefix <- paste0(prefix, "\n ")FUN(X[[i]], ...) }
else prefix <- "Error : " 3: msg <- paste0(prefix, conditionMessage(e), "\n")lapply(X = S, FUN = FUN, ...) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) { 4: cat(msg, file = outFile)doTryCatch(return(expr), name, parentenv, handler) .Internal(printDeferredWarnings()) }
invisible(structure(msg, class = "try-error", condition = e)) 5: })tryCatchOne(expr, names, parentenv, handlers[[1L]])
8: 6: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
tryCatchList(expr, classes, parentenv, handlers) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
7: tryCatch(expr, error = function(e) {10: call <- conditionCall(e)FUN(X[[i]], ...) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 11: lapply(seq_len(cores), inner.do) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)12: prefix <- paste("Error in", dcall, ": ")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]13: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, if (is.na(w)) verbose = (verbosity > 4)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")14: if (w > LONG) .self$do_with_inits(inits, Q, reinitialization_effort)
prefix <- paste0(prefix, "\n ")15: } else prefix <- "Error : ".self$estim_ascend(reinitialization_effort, changing_effort) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))16: if (!silent && isTRUE(getOption("show.error.messages"))) {private$BMobject$estimate() cat(msg, file = outFile)
.Internal(printDeferredWarnings())17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) invisible(structure(msg, class = "try-error", condition = e))
})18:
eval(code, test_env)
8: 19: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)eval(code, test_env)
9: 20: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))withCallingHandlers({
eval(code, test_env)10: new_expectations <- the$test_expectations > starting_expectationsFUN(X[[i]], ...) if (snapshot_skipped) {
skip("On CRAN")11: }lapply(seq_len(cores), inner.do) else if (!new_expectations && skip_on_empty) {
skip_empty()12: }parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, expectation = handle_expectation, packageNotFoundError = function(e) { mc.silent = TRUE) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, }, snapshot_on_cran = function(cnd) { verbose = (verbosity > 4)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")14: }, skip = handle_skip, warning = handle_warning, message = handle_message, .self$do_with_inits(inits, Q, reinitialization_effort) error = handle_error, interrupt = handle_interrupt)
15: 21: .self$estim_ascend(reinitialization_effort, changing_effort)doTryCatch(return(expr), name, parentenv, handler)
16:
private$BMobject$estimate()22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
23: 18: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env)
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."))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, }, 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({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {21: skip("On CRAN") }doTryCatch(return(expr), name, parentenv, handler) else if (!new_expectations && skip_on_empty) {
skip_empty()22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {23: skip(paste0("{", e$package, "} is not installed."))tryCatchList(expr, classes, parentenv, handlers) }
}, snapshot_on_cran = function(cnd) {24: snapshot_skipped <<- TRUEtryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), new_expectations <- the$test_expectations > starting_expectations end_test = function() { }) if (snapshot_skipped) {
skip("On CRAN")28: }test_code(code, parent.frame()) else if (!new_expectations && skip_on_empty) {
skip_empty()29: }test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", }, expectation = handle_expectation, packageNotFoundError = function(e) { { if (on_cran()) { sampler_directed_nocov$rNetwork(store = TRUE) skip(paste0("{", e$package, "} is not installed.")) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, } "bernoulli", TRUE)}, snapshot_on_cran = function(cnd) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, snapshot_skipped <<- TRUE plot = FALSE)) invokeRestart("muffle_cran_snapshot") mySBM_sbm$setModel(3)}, skip = handle_skip, warning = handle_warning, message = handle_message, net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) cl <- net$clustering(3)[[1]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, 25: clusterInit = cl)doWithOneRestart(return(expr), restart) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 26: 0.1)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.95)27: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), withRestarts(tryCatch(withCallingHandlers({ 0.01) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations 0.1) if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), skip("On CRAN") 0.2) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), else if (!new_expectations && skip_on_empty) { 0.95) skip_empty() })
}}, expectation = handle_expectation, packageNotFoundError = function(e) {30: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) }
}, snapshot_on_cran = function(cnd) {31: snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 32: end_test = function() {withCallingHandlers({ }) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations28: test_code(code, parent.frame()) if (snapshot_skipped) {
skip("On CRAN")29: 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) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm$setModel(3) if (on_cran()) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) skip(paste0("{", e$package, "} is not installed.")) cl <- net$clustering(3)[[1]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, }, snapshot_on_cran = function(cnd) { clusterInit = cl) mySBM_missSBM$doVEM() snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.95) error = handle_error, interrupt = handle_interrupt) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)33: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), doTryCatch(return(expr), name, parentenv, handler) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 34: 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), tryCatchOne(expr, names, parentenv, handlers[[1L]])
0.95)35: })tryCatchList(expr, classes, parentenv, handlers)
30: 36: eval(code, test_env)tryCatch(withCallingHandlers({
eval(code, test_env)31: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {32: skip("On CRAN")withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE37: invokeRestart("muffle_cran_snapshot")doWithOneRestart(return(expr), restart)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)38:
withOneRestart(expr, restarts[[1L]])33:
doTryCatch(return(expr), name, parentenv, handler)
39: 34: withRestarts(tryCatch(withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env)
35: new_expectations <- the$test_expectations > starting_expectationstryCatchList(expr, classes, parentenv, handlers) if (snapshot_skipped) {
skip("On CRAN")36: }tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { 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.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip(paste0("{", e$package, "} is not installed.")) end_test = function() { } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE40: invokeRestart("muffle_cran_snapshot")test_code(code = exprs, env = env, reporter = get_reporter() %||% }, skip = handle_skip, warning = handle_warning, message = handle_message, StopReporter$new()) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: 41: doWithOneRestart(return(expr), restart)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)38:
withOneRestart(expr, restarts[[1L]])42:
FUN(X[[i]], ...)39:
withRestarts(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 if (snapshot_skipped) { error_call = error_call) 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) { if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}46: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")47: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(code, testthat_abort_reporter = function(cnd) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), cat(conditionMessage(cnd), "\n") end_test = function() { NULL })})
40: 48: test_code(code = exprs, env = env, reporter = get_reporter() %||% with_reporter(reporters$multi, lapply(test_paths, test_one_file, StopReporter$new()) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
41: 49: source_file(path, env = env(env), desc = desc, shuffle = shuffle, test_files_serial(test_dir = test_dir, test_package = test_package, error_call = error_call) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 42: FUN(X[[i]], ...) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 50: error_call = error_call)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 44: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, doTryCatch(return(expr), name, parentenv, handler) load_package = load_package, parallel = parallel, shuffle = shuffle)
45: 51: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_dir("testthat", package = package, reporter = reporter,
46: ..., load_package = "installed")tryCatchList(expr, classes, parentenv, handlers)
52: 47: tryCatch(code, testthat_abort_reporter = function(cnd) {test_check("missSBM") cat(conditionMessage(cnd), "\n")
NULLAn irrecoverable exception occurred. R is aborting now ...
})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-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