Running 'testthat.R' [8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(survdnn)
  Warning message:
  Torch libraries are installed but loading them caused a segfault.
  Please reinstall torch with `install_torch(reinstall = TRUE)`
  You can disable this check by setting `TORCH_VERIFY_LOAD` to "FALSE"
  ! callr subprocess failed: could not start R, exited with non-zero status, has
  crashed or was killed 
  > 
  > test_check("survdnn")
  [ FAIL 5 | WARN 0 | SKIP 21 | PASS 0 ]
  
  ══ Skipped tests (21) ══════════════════════════════════════════════════════════
  • On CRAN (21): 'test-cv_survdnn.R:2:3', 'test-cv_survdnn.R:25:3',
    'test-evaluate_survdnn.R:2:3', 'test-evaluate_survdnn.R:21:3',
    'test-metrics.R:2:3', 'test-metrics.R:20:3', 'test-metrics.R:38:3',
    'test-metrics.R:56:3', 'test-plot.survdnn.R:2:3', 'test-plot.survdnn.R:15:3',
    'test-plot.survdnn.R:32:3', 'test-predict.survdnn.R:2:3',
    'test-predict.survdnn.R:17:3', 'test-predict.survdnn.R:35:3',
    'test-predict.survdnn.R:50:3', 'test-print.survdnn.R:2:3',
    'test-summary.survdnn.R:2:3', 'test-survdnn.R:2:3',
    'test-tune_survdnn.R:2:3', 'test-tune_survdnn.R:62:3',
    'test-tune_survdnn.R:92:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-losses.R:5:3'): cox_loss returns scalar tensor ─────────────────
  <std::runtime_error/C++Error/error/condition>
  Error in `torch_tensor_cpp(data, dtype, device, requires_grad, pin_memory)`: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
  Backtrace:
      ▆
   1. └─torch::torch_tensor(runif(20, 1, 100)) at test-losses.R:5:3
   2.   └─Tensor$new(data, dtype, device, requires_grad, pin_memory)
   3.     └─methods$initialize(NULL, NULL, ...)
   4.       └─torch:::torch_tensor_cpp(...)
  ── Error ('test-losses.R:16:3'): cox_l2_loss returns penalized scalar tensor ───
  <std::runtime_error/C++Error/error/condition>
  Error in `torch_tensor_cpp(data, dtype, device, requires_grad, pin_memory)`: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
  Backtrace:
      ▆
   1. └─torch::torch_tensor(runif(20, 1, 100)) at test-losses.R:16:3
   2.   └─Tensor$new(data, dtype, device, requires_grad, pin_memory)
   3.     └─methods$initialize(NULL, NULL, ...)
   4.       └─torch:::torch_tensor_cpp(...)
  ── Error ('test-losses.R:29:3'): aft_loss returns scalar tensor (uncensored only) ──
  <std::runtime_error/C++Error/error/condition>
  Error in `torch_tensor_cpp(data, dtype, device, requires_grad, pin_memory)`: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
  Backtrace:
      ▆
   1. └─torch::torch_tensor(runif(20, 1, 100)) at test-losses.R:29:3
   2.   └─Tensor$new(data, dtype, device, requires_grad, pin_memory)
   3.     └─methods$initialize(NULL, NULL, ...)
   4.       └─torch:::torch_tensor_cpp(...)
  ── Error ('test-losses.R:40:3'): aft_loss returns 0 for fully censored data ────
  <std::runtime_error/C++Error/error/condition>
  Error in `torch_tensor_cpp(data, dtype, device, requires_grad, pin_memory)`: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
  Backtrace:
      ▆
   1. └─torch::torch_tensor(runif(10, 1, 100)) at test-losses.R:40:3
   2.   └─Tensor$new(data, dtype, device, requires_grad, pin_memory)
   3.     └─methods$initialize(NULL, NULL, ...)
   4.       └─torch:::torch_tensor_cpp(...)
  ── Error ('test-losses.R:56:3'): coxtime_loss implements partial likelihood faithfully ──
  <std::runtime_error/C++Error/error/condition>
  Error in `(function (size, options) 
  {
      .Call(`_torch_cpp_torch_namespace_randn_size_IntArrayRef`, 
          size, options)
  })(size = c(50, 1), options = list(dtype = NULL, layout = NULL, 
      device = NULL, requires_grad = FALSE))`: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
  Backtrace:
      ▆
   1. └─torch::torch_randn(c(n, 1)) at test-losses.R:56:3
   2.   ├─base::do.call(.torch_randn, args)
   3.   └─torch (local) `<fn>`(options = `<named list>`, size = `<dbl>`)
   4.     └─torch:::call_c_function(...)
   5.       └─torch:::do_call(f, args)
   6.         ├─base::do.call(fun, args)
   7.         └─torch (local) `<fn>`(size = `<dbl>`, options = `<named list>`)
  
  [ FAIL 5 | WARN 0 | SKIP 21 | PASS 0 ]
  Error: Test failures
  Execution halted