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