Last updated on 2026-11-03 10:54:48 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 82.70 | 337.88 | 420.58 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 58.57 | 227.81 | 286.38 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 60.00 | 235.13 | 295.13 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 239.38 | 303.38 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 417.00 | 508.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 85.14 | 334.40 | 419.54 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 78.27 | 331.21 | 409.48 | 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 | 101.00 | 348.00 | 449.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | ERROR | ||||
| r-oldrel-macos-x86_64 | 1.1.0 | 59.00 | 679.00 | 738.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.0 | 114.00 | 475.00 | 589.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 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:
Traceback:
1: tryCatch(withCallingHandlers({dispatcher(membership_name, membership_init$to_cc(), model_name, eval(code, test_env) .self$network_to_cc(), TRUE) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 2: skip("On CRAN")FUN(X[[i]], ...) }
else if (!new_expectations && skip_on_empty) { 3: skip_empty()lapply(X = S, FUN = FUN, ...) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 4: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed."))
} 5: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 6: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
7: 25: tryCatch(expr, error = function(e) {doWithOneRestart(return(expr), restart) call <- conditionCall(e)
if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)26: dcall <- deparse(call, nlines = 1L)withOneRestart(expr, restarts[[1L]]) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L27: sm <- strsplit(conditionMessage(e), "\n")[[1L]]withRestarts(tryCatch(withCallingHandlers({ w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") eval(code, test_env) if (is.na(w)) new_expectations <- the$test_expectations > starting_expectations w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (snapshot_skipped) { type = "b") skip("On CRAN") if (w > LONG) } prefix <- paste0(prefix, "\n ") else if (!new_expectations && skip_on_empty) { } skip_empty() else prefix <- "Error : " } msg <- paste0(prefix, conditionMessage(e), "\n")}, expectation = handle_expectation, packageNotFoundError = function(e) { .Internal(seterrmessage(msg[1L])) if (on_cran()) { if (!silent && isTRUE(getOption("show.error.messages"))) { skip(paste0("{", e$package, "} is not installed.")) cat(msg, file = outFile) } .Internal(printDeferredWarnings())}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE invisible(structure(msg, class = "try-error", condition = e)) invokeRestart("muffle_cran_snapshot")})}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 8: end_test = function() {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) })
9: 28: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))test_code(code, parent.frame())
10: 29: FUN(X[[i]], ...)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate",
{11: sampler_undirected_cov$rNetwork(store = TRUE)lapply(seq_len(cores), inner.do) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData,
"bernoulli", FALSE, covarList = covarList_undirected)12: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, plot = FALSE)) mc.silent = TRUE) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, 13: covariates = covarList_undirected)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, cls <- net$clustering(1:(2 * Q)) verbose = (verbosity > 4)) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 14: clusterInit = cl, covarList = covarList_undirected).self$do_with_inits(inits, Q, reinitialization_effort) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 15: 0.05).self$estim_ascend(reinitialization_effort, changing_effort) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)16: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), private$BMobject$estimate() 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 17: 0.1)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam),
0.1)18: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), eval(code, test_env) 0.85)
})19:
eval(code, test_env)30:
eval(code, test_env)20:
withCallingHandlers({31: eval(code, test_env)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) { 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) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")21: }, skip = handle_skip, warning = handle_warning, message = handle_message, doTryCatch(return(expr), name, parentenv, handler) error = handle_error, interrupt = handle_interrupt)
22: 33: tryCatchOne(expr, names, parentenv, handlers[[1L]])doTryCatch(return(expr), name, parentenv, handler)
23: 34: tryCatchList(expr, classes, parentenv, handlers)tryCatchOne(expr, names, parentenv, handlers[[1L]])
24: 35: tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) {tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { 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)
26: 37: withOneRestart(expr, restarts[[1L]])doWithOneRestart(return(expr), restart)
27: 38: withRestarts(tryCatch(withCallingHandlers({withOneRestart(expr, restarts[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations39: 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 end_test = function() { invokeRestart("muffle_cran_snapshot") })}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 28: end_test = function() {test_code(code, parent.frame()) })
29: 40: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", test_code(code = exprs, env = env, reporter = get_reporter() %||% { StopReporter$new()) sampler_undirected_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, 41: "bernoulli", FALSE, covarList = covarList_undirected)source_file(path, env = env(env), desc = desc, shuffle = shuffle, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) error_call = error_call) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, 42: covariates = covarList_undirected)FUN(X[[i]], ...) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]]43: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, clusterInit = cl, covarList = covarList_undirected) error_call = error_call) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 44: 0.05)doTryCatch(return(expr), name, parentenv, handler) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)45: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 46: 0.1)tryCatchList(expr, classes, parentenv, handlers) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam),
0.1)47: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), tryCatch(code, testthat_abort_reporter = function(cnd) { 0.85) cat(conditionMessage(cnd), "\n") }) NULL
})30:
eval(code, test_env)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 31: env = env, desc = desc, shuffle = shuffle, error_call = error_call))eval(code, test_env)
49: 32: test_files_serial(test_dir = test_dir, test_package = test_package, withCallingHandlers({ test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, eval(code, test_env) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, new_expectations <- the$test_expectations > starting_expectations desc = desc, load_package = load_package, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call) skip("On CRAN")
}50: else if (!new_expectations && skip_on_empty) {test_files(test_dir = path, test_paths = test_paths, test_package = package, skip_empty() reporter = reporter, load_helpers = load_helpers, env = env, } stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, expectation = handle_expectation, packageNotFoundError = function(e) { load_package = load_package, parallel = parallel, shuffle = shuffle) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))51: }test_dir("testthat", package = package, reporter = reporter, }, snapshot_on_cran = function(cnd) { ..., load_package = "installed") snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")52: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_check("missSBM") error = handle_error, interrupt = handle_interrupt)
An irrecoverable exception occurred. R is aborting now ...
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)
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)
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, 26: withOneRestart(expr, restarts[[1L]]) .self$network_to_cc(), TRUE)
27: 2: withRestarts(tryCatch(withCallingHandlers({FUN(X[[i]], ...) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 3: if (snapshot_skipped) { skip("On CRAN")lapply(X = S, FUN = FUN, ...)
} 4: doTryCatch(return(expr), name, parentenv, handler) else if (!new_expectations && skip_on_empty) {
skip_empty() 5: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
6: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers)
skip(paste0("{", e$package, "} is not installed.")) 7: tryCatch(expr, error = function(e) { } call <- conditionCall(e) if (!is.null(call)) {}, snapshot_on_cran = function(cnd) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) snapshot_skipped <<- TRUE dcall <- deparse(call, nlines = 1L) invokeRestart("muffle_cran_snapshot") prefix <- paste("Error in", dcall, ": ") LONG <- 75L}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { 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")28: if (w > LONG) prefix <- paste0(prefix, "\n ")test_code(code, parent.frame())
} else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { { cat(msg, file = outFile) .Internal(printDeferredWarnings()) sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, } invisible(structure(msg, class = "try-error", condition = e)) "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, })
plot = FALSE)) 8: mySBM_sbm$setModel(Q)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData,
covariates = covarList_directed) 9: cls <- net$clustering(1:(2 * Q))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) cl <- cls[[Q]]
10: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed)FUN(X[[i]], ...)
mySBM_missSBM$doVEM(trace = TRUE)11: lapply(seq_len(cores), inner.do) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
12: 0.1)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), mc.silent = TRUE) 0.8)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 13: 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 0.1) verbose = (verbosity > 4)) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships),
0.85)14: }).self$do_with_inits(inits, Q, reinitialization_effort)
30: 15: eval(code, test_env).self$estim_ascend(reinitialization_effort, changing_effort)
31: eval(code, test_env)16:
32: private$BMobject$estimate()withCallingHandlers({ eval(code, test_env)
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: eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))20: }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) }
33: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {34: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}35: tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 36: error = handle_error, interrupt = handle_interrupt)tryCatch(withCallingHandlers({ 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) { if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) 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")
}37: else if (!new_expectations && skip_on_empty) {doWithOneRestart(return(expr), restart) skip_empty()
}38: }, expectation = handle_expectation, packageNotFoundError = function(e) {withOneRestart(expr, restarts[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))39: }withRestarts(tryCatch(withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
else if (!new_expectations && skip_on_empty) {25: skip_empty()doWithOneRestart(return(expr), restart) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {26: if (on_cran()) {withOneRestart(expr, restarts[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}27: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEwithRestarts(tryCatch(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) { end_test = function() { 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: snapshot_skipped <<- TRUEFUN(X[[i]], ...) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 43: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, end_test = function() { error_call = error_call) })
28: 44: test_code(code, parent.frame())doTryCatch(return(expr), name, parentenv, handler)
45: 29: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate",
{46: sampler_directed_cov$rNetwork(store = TRUE)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData,
"bernoulli", TRUE, covarList = covarList_directed)47: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, tryCatch(code, testthat_abort_reporter = function(cnd) { plot = FALSE)) cat(conditionMessage(cnd), "\n") mySBM_sbm$setModel(Q) NULL net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, }) covariates = covarList_directed)
cls <- net$clustering(1:(2 * Q))48: cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, with_reporter(reporters$multi, lapply(test_paths, test_one_file, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
49: 0.1)test_files_serial(test_dir = test_dir, test_package = test_package, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 0.8) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), desc = desc, load_package = load_package, shuffle = shuffle, 0.05) error_call = error_call) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean),
0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, 0.85) 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)30:
51: test_dir("testthat", package = package, reporter = reporter, eval(code, test_env) ..., load_package = "installed")
31: 52: eval(code, test_env)test_check("missSBM")
32: An irrecoverable exception occurred. R is aborting now ...
withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, 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) 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()) {
Traceback:
skip(paste0("{", e$package, "} is not installed.")) 1: }dispatcher(membership_name, membership_init$to_cc(), model_name, }, snapshot_on_cran = function(cnd) { .self$network_to_cc(), TRUE) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 2: }, skip = handle_skip, warning = handle_warning, message = handle_message, FUN(X[[i]], ...) error = handle_error, interrupt = handle_interrupt)
3:
lapply(X = S, FUN = FUN, ...)33:
doTryCatch(return(expr), name, parentenv, handler) 4:
doTryCatch(return(expr), name, parentenv, handler)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]])35:
tryCatchList(expr, classes, parentenv, handlers) 6:
tryCatchList(expr, classes, parentenv, handlers)36: tryCatch(withCallingHandlers({
eval(code, test_env) 7: new_expectations <- the$test_expectations > starting_expectationstryCatch(expr, error = function(e) { if (snapshot_skipped) { 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, ": ")}, expectation = handle_expectation, packageNotFoundError = function(e) { LONG <- 75L if (on_cran()) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] skip(paste0("{", e$package, "} is not installed.")) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") } if (is.na(w)) }, snapshot_on_cran = function(cnd) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], snapshot_skipped <<- TRUE type = "b") invokeRestart("muffle_cran_snapshot") if (w > LONG) }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
prefix <- paste0(prefix, "\n ")37: }doWithOneRestart(return(expr), restart) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")38: .Internal(seterrmessage(msg[1L]))withOneRestart(expr, restarts[[1L]]) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)39: .Internal(printDeferredWarnings())withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env) invisible(structure(msg, class = "try-error", condition = e)) new_expectations <- the$test_expectations > starting_expectations}) if (snapshot_skipped) {
skip("On CRAN") 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE) else if (!new_expectations && skip_on_empty) {
skip_empty() 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {10: skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) }
}, snapshot_on_cran = function(cnd) {11: snapshot_skipped <<- TRUElapply(seq_len(cores), inner.do) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 12: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, end_test = function() { mc.silent = TRUE) })
13: 40: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, test_code(code = exprs, env = env, reporter = get_reporter() %||% verbose = (verbosity > 4)) StopReporter$new())
14: 41: .self$do_with_inits(inits, Q, reinitialization_effort)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)15:
.self$estim_ascend(reinitialization_effort, changing_effort)42:
FUN(X[[i]], ...)16:
private$BMobject$estimate()43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 17: error_call = error_call)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
44: doTryCatch(return(expr), name, parentenv, handler)18:
eval(code, test_env)
45: 19: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
20: 46: withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations47: if (snapshot_skipped) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip("On CRAN") cat(conditionMessage(cnd), "\n") } NULL else if (!new_expectations && skip_on_empty) {}) skip_empty()
}48: }, expectation = handle_expectation, packageNotFoundError = function(e) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, if (on_cran()) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip(paste0("{", e$package, "} is not installed."))
}49: }, snapshot_on_cran = function(cnd) {test_files_serial(test_dir = test_dir, test_package = test_package, snapshot_skipped <<- TRUE test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, invokeRestart("muffle_cran_snapshot") env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)21:
doTryCatch(return(expr), name, parentenv, handler)50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 22: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatchOne(expr, names, parentenv, handlers[[1L]]) load_package = load_package, parallel = parallel, shuffle = shuffle)
23:
tryCatchList(expr, classes, parentenv, handlers)51:
test_dir("testthat", package = package, reporter = reporter, 24: ..., load_package = "installed")tryCatch(withCallingHandlers({
eval(code, test_env)52: new_expectations <- the$test_expectations > starting_expectationstest_check("missSBM") if (snapshot_skipped) {
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)
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) 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)
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:
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, try(lapply(X = S, FUN = FUN, ...), silent = TRUE) .self$network_to_cc(), TRUE)
9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 2:
FUN(X[[i]], ...)
10: 3: lapply(X = S, FUN = FUN, ...)FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do) 4: doTryCatch(return(expr), name, parentenv, handler)
12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 5: mc.silent = TRUE)tryCatchOne(expr, names, parentenv, handlers[[1L]])
13:
6: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))tryCatchList(expr, classes, parentenv, handlers)
7: 14: tryCatch(expr, error = function(e) {.self$do_with_inits(inits, Q, reinitialization_effort) call <- conditionCall(e)
if (!is.null(call)) {15: if (identical(call[[1L]], quote(doTryCatch))) .self$estim_ascend(reinitialization_effort, changing_effort) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")16: LONG <- 75Lprivate$BMobject$estimate() sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")17: if (is.na(w)) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 18: type = "b")eval(code, test_env) if (w > LONG)
prefix <- paste0(prefix, "\n ") }19: else prefix <- "Error : "eval(code, test_env)
msg <- paste0(prefix, conditionMessage(e), "\n")20: .Internal(seterrmessage(msg[1L]))withCallingHandlers({ if (!silent && isTRUE(getOption("show.error.messages"))) { eval(code, test_env) cat(msg, file = outFile) new_expectations <- the$test_expectations > starting_expectations .Internal(printDeferredWarnings()) if (snapshot_skipped) { skip("On CRAN") } } invisible(structure(msg, class = "try-error", condition = e)) else if (!new_expectations && skip_on_empty) {}) skip_empty()
} 8: }, expectation = handle_expectation, packageNotFoundError = function(e) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE10: invokeRestart("muffle_cran_snapshot")FUN(X[[i]], ...)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)11:
lapply(seq_len(cores), inner.do)21:
doTryCatch(return(expr), name, parentenv, handler)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 22: mc.silent = TRUE)tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: 23: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, tryCatchList(expr, classes, parentenv, handlers) verbose = (verbosity > 4))
14: 24: .self$do_with_inits(inits, Q, reinitialization_effort)tryCatch(withCallingHandlers({
eval(code, test_env)15: new_expectations <- the$test_expectations > starting_expectations.self$estim_ascend(reinitialization_effort, changing_effort) if (snapshot_skipped) {
16: skip("On CRAN")private$BMobject$estimate() }
else if (!new_expectations && skip_on_empty) {17: skip_empty()mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {18: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}19: }, snapshot_on_cran = function(cnd) {eval(code, test_env) snapshot_skipped <<- TRUE
20: invokeRestart("muffle_cran_snapshot")withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {25: skip("On CRAN")doWithOneRestart(return(expr), restart) }
else if (!new_expectations && skip_on_empty) {26: skip_empty()withOneRestart(expr, restarts[[1L]]) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {27: if (on_cran()) {withRestarts(tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { 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) skip_empty()
}21: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE23: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 24: end_test = function() {tryCatch(withCallingHandlers({ }) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations28: if (snapshot_skipped) {test_code(code, parent.frame()) skip("On CRAN")
}29: else if (!new_expectations && skip_on_empty) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { skip_empty() sampler_directed_nocov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", TRUE) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(3)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) invokeRestart("muffle_cran_snapshot") cl <- net$clustering(3)[[1]]}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) clusterInit = cl)
mySBM_missSBM$doVEM()25: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), doWithOneRestart(return(expr), restart) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 26: 0.95)withOneRestart(expr, restarts[[1L]]) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 27: 0.1)withRestarts(tryCatch(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) {30: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {31: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}32: }, snapshot_on_cran = function(cnd) {withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) {
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, "bernoulli", TRUE) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) error = handle_error, interrupt = handle_interrupt) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)
33: cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, doTryCatch(return(expr), name, parentenv, handler) clusterInit = cl)
34: mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.1)
35: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)tryCatchList(expr, classes, parentenv, handlers) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)
36: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1)tryCatch(withCallingHandlers({ eval(code, test_env) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) new_expectations <- the$test_expectations > starting_expectations expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) if (snapshot_skipped) { skip("On CRAN") }) } else if (!new_expectations && skip_on_empty) {
30: skip_empty() }eval(code, test_env)
}, expectation = handle_expectation, packageNotFoundError = function(e) {31: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}32: withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN") }}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) {
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 <<- TRUE
39: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, withRestarts(tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env)
33: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {doTryCatch(return(expr), name, parentenv, handler)
skip("On CRAN")34: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()35: tryCatchList(expr, classes, parentenv, handlers) }
36: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatch(withCallingHandlers({ if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { skip("On CRAN") snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), else if (!new_expectations && skip_on_empty) { end_test = function() { }) skip_empty()
40: }test_code(code = exprs, env = env, reporter = get_reporter() %||% }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { StopReporter$new())
skip(paste0("{", e$package, "} is not installed.")) }41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, }, snapshot_on_cran = function(cnd) { error_call = error_call)
snapshot_skipped <<- TRUE42: FUN(X[[i]], ...) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 43: 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)
37: 44: doWithOneRestart(return(expr), restart)doTryCatch(return(expr), name, parentenv, handler)
45: 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
withOneRestart(expr, restarts[[1L]])46: tryCatchList(expr, classes, parentenv, handlers)
39:
47: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)tryCatch(code, testthat_abort_reporter = function(cnd) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { cat(conditionMessage(cnd), "\n") NULL skip("On CRAN") } else if (!new_expectations && skip_on_empty) {})
skip_empty() }48: }, expectation = handle_expectation, packageNotFoundError = function(e) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
}}, snapshot_on_cran = function(cnd) {49: test_files_serial(test_dir = test_dir, test_package = test_package, snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, }, skip = handle_skip, warning = handle_warning, message = handle_message, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { error_call = error_call)
})
40: 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
41: load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) ..., load_package = "installed")
42: 52: FUN(X[[i]], ...)test_check("missSBM")
43: An irrecoverable exception occurred. R is aborting now ...
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-44.R
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• On CRAN (3): 'test-explore-block-count.R:4:3',
'test-missSBM_collection-degenerate.R:80:3',
'test-missSBM_collection-estimate_chain.R:64:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
Error:
! Test failures.
Execution halted
Flavor: r-oldrel-macos-arm64