Running ‘testthat.R’ [68s/108s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(MIRES)
  > 
  > test_check("MIRES")
  [1] "no object returned"
  [1] "no object returned"
  Chain 1: ------------------------------------------------------------
  Chain 1: EXPERIMENTAL ALGORITHM:
  Chain 1:   This procedure has not been thoroughly tested and may be unstable
  Chain 1:   or buggy. The interface is subject to change.
  Chain 1: ------------------------------------------------------------
  Chain 1: 
  Chain 1: 
  Chain 1: 
  Chain 1: Gradient evaluation took 0.029891 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 298.91 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: Begin eta adaptation.
  Chain 1: Iteration:   1 / 250 [  0%]  (Adaptation)
  Chain 1: Iteration:  50 / 250 [ 20%]  (Adaptation)
  Chain 1: Iteration: 100 / 250 [ 40%]  (Adaptation)
  Chain 1: Iteration: 150 / 250 [ 60%]  (Adaptation)
  Chain 1: Iteration: 200 / 250 [ 80%]  (Adaptation)
  Chain 1: Success! Found best value [eta = 1] earlier than expected.
  Chain 1: 
  Chain 1: Begin stochastic gradient ascent.
  Chain 1:   iter             ELBO   delta_ELBO_mean   delta_ELBO_med   notes 
  Chain 1:    100         -252.325             1.000            1.000
  Chain 1:    200          -98.346             1.283            1.566
  Chain 1:    300          -93.445             0.873            1.000   MEAN ELBO CONVERGED
  Chain 1: 
  Chain 1: Drawing a sample of size 1000 from the approximate posterior... 
  Chain 1: COMPLETED.
  Chain 1: ------------------------------------------------------------
  Chain 1: EXPERIMENTAL ALGORITHM:
  Chain 1:   This procedure has not been thoroughly tested and may be unstable
  Chain 1:   or buggy. The interface is subject to change.
  Chain 1: ------------------------------------------------------------
  Chain 1: 
  Chain 1: 
  Chain 1: 
  Chain 1: Gradient evaluation took 0.011172 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 111.72 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: Begin eta adaptation.
  Chain 1: Iteration:   1 / 250 [  0%]  (Adaptation)
  Chain 1: Iteration:  50 / 250 [ 20%]  (Adaptation)
  Chain 1: Iteration: 100 / 250 [ 40%]  (Adaptation)
  Chain 1: Iteration: 150 / 250 [ 60%]  (Adaptation)
  Chain 1: Iteration: 200 / 250 [ 80%]  (Adaptation)
  Chain 1: Success! Found best value [eta = 1] earlier than expected.
  Chain 1: 
  Chain 1: Begin stochastic gradient ascent.
  Chain 1:   iter             ELBO   delta_ELBO_mean   delta_ELBO_med   notes 
  Chain 1:    100         -251.625             1.000            1.000
  Chain 1:    200         -117.638             1.069            1.139
  Chain 1:    300         -108.307             0.742            1.000   MEAN ELBO CONVERGED
  Chain 1: 
  Chain 1: Drawing a sample of size 1000 from the approximate posterior... 
  Chain 1: COMPLETED.
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.001214 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 12.14 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 0.279 seconds (Warm-up)
  Chain 1:                0.016 seconds (Sampling)
  Chain 1:                0.295 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.000957 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 9.57 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 0.314 seconds (Warm-up)
  Chain 1:                0.727 seconds (Sampling)
  Chain 1:                1.041 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.001435 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 14.35 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 0.173 seconds (Warm-up)
  Chain 1:                0.031 seconds (Sampling)
  Chain 1:                0.204 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.001558 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 15.58 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 0.194 seconds (Warm-up)
  Chain 1:                0.031 seconds (Sampling)
  Chain 1:                0.225 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.000772 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 7.72 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 0.984 seconds (Warm-up)
  Chain 1:                0.532 seconds (Sampling)
  Chain 1:                1.516 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.000747 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 7.47 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 0.271 seconds (Warm-up)
  Chain 1:                0.707 seconds (Sampling)
  Chain 1:                0.978 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.000877 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 8.77 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 1.283 seconds (Warm-up)
  Chain 1:                0.859 seconds (Sampling)
  Chain 1:                2.142 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.000818 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 8.18 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration: 3 / 10 [ 30%]  (Warmup)
  Chain 1: Iteration: 4 / 10 [ 40%]  (Warmup)
  Chain 1: Iteration: 5 / 10 [ 50%]  (Warmup)
  Chain 1: Iteration: 6 / 10 [ 60%]  (Sampling)
  Chain 1: Iteration: 7 / 10 [ 70%]  (Sampling)
  Chain 1: Iteration: 8 / 10 [ 80%]  (Sampling)
  Chain 1: Iteration: 9 / 10 [ 90%]  (Sampling)
  Chain 1: Iteration: 10 / 10 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 0.231 seconds (Warm-up)
  Chain 1:                0.659 seconds (Sampling)
  Chain 1:                0.89 seconds (Total)
  Chain 1: 
  
  SAMPLING FOR MODEL 'redifhm_all' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.000742 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 7.42 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: There aren't enough warmup iterations to fit the
  Chain 1:          three stages of adaptation as currently configured.
  Chain 1:          Reducing each adaptation stage to 15%/75%/10% of
  Chain 1:          the given number of warmup iterations:
  Chain 1:            init_buffer = 7
  Chain 1:            adapt_window = 38
  Chain 1:            term_buffer = 5
  Chain 1: 
  Chain 1: Iteration:  1 / 100 [  1%]  (Warmup)
  Chain 1: Iteration: 10 / 100 [ 10%]  (Warmup)
  Chain 1: Iteration: 20 / 100 [ 20%]  (Warmup)
  Chain 1: Iteration: 30 / 100 [ 30%]  (Warmup)
  Chain 1: Iteration: 40 / 100 [ 40%]  (Warmup)
  Chain 1: Iteration: 50 / 100 [ 50%]  (Warmup)
  Chain 1: Iteration: 51 / 100 [ 51%]  (Sampling)
  Chain 1: Iteration: 60 / 100 [ 60%]  (Sampling)
  Chain 1: Iteration: 70 / 100 [ 70%]  (Sampling)
  Chain 1: Iteration: 80 / 100 [ 80%]  (Sampling)
  Chain 1: Iteration: 90 / 100 [ 90%]  (Sampling)
  Chain 1: Iteration: 100 / 100 [100%]  (Sampling)
  Chain 1: 
  Chain 1:  Elapsed Time: 15.833 seconds (Warm-up)
  Chain 1:                14.686 seconds (Sampling)
  Chain 1:                30.519 seconds (Total)
  Chain 1: 
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 93 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_density_funs.R:20:5'): posterior_density_funs_sigmas calls DP when needed. ──
  Error in `validate_ll(log_ratios)`: All input values must be finite.
  Backtrace:
       ▆
    1. ├─base::suppressWarnings(...) at test_density_funs.R:20:4
    2. │ └─base::withCallingHandlers(...)
    3. └─MIRES:::posterior_density_funs_sigmas(test_obj, tol_rel_obj = 1)
    4.   └─base::sapply(...)
    5.     └─base::lapply(X = X, FUN = FUN, ...)
    6.       └─MIRES (local) FUN(X[[i]], ...)
    7.         ├─rstan::vb(...)
    8.         └─rstan::vb(...)
    9.           └─rstan (local) .local(object, ...)
   10.             ├─base::suppressWarnings(loo::psis(lr, r_eff = 1))
   11.             │ └─base::withCallingHandlers(...)
   12.             ├─loo::psis(lr, r_eff = 1)
   13.             └─loo:::psis.default(lr, r_eff = 1)
   14.               └─loo:::importance_sampling.default(...)
   15.                 └─loo:::importance_sampling.matrix(...)
   16.                   └─loo:::validate_ll(log_ratios)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 93 ]
  Error: Test failures
  Execution halted