Running ‘testthat.R’ [8s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(survivalmodels)
  > 
  > test_check("survivalmodels")
  [ FAIL 5 | WARN 0 | SKIP 10 | PASS 18 ]
  
  ══ Skipped tests (10) ══════════════════════════════════════════════════════════
  • One of torch, numpy, pycox not available for testing. (7):
    'test_coxtime.R:1:1', 'test_deephit.R:1:1', 'test_deepsurv.R:1:1',
    'test_helpers.R:26:3', 'test_loghaz.R:1:1', 'test_pchazard.R:1:1',
    'test_pycox.R:1:1'
  • distr6 not installed. (3): 'test_akritas.R:2:3', 'test_helpers.R:18:5',
    'test_methods.R:3:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_dnnsurv.R:5:3'): silent ────────────────────────────────────────
  <cmdError/error/condition>
  Error in `system2(command = python, args = shQuote(script), stdout = TRUE, 
      stderr = FALSE)`: error in running command
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_dnnsurv.R:5:2
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─survivalmodels::dnnsurv(...) at test_dnnsurv.R:5:17
   10.   └─keras::keras_model_sequential()
   11.     ├─keras$models
   12.     └─reticulate:::`$.python.builtin.module`(keras, "models")
   13.       └─reticulate:::py_resolve_module_proxy(x)
   14.         └─keras (local) on_error(result)
   15.           ├─base::stop(tf_config()$error_message, call. = FALSE)
   16.           └─tensorflow::tf_config()
   17.             └─reticulate::py_config()
   18.               └─reticulate:::ensure_python_initialized()
   19.                 └─reticulate:::initialize_python()
   20.                   └─(function() {...
   21.                     └─reticulate::py_discover_config(required_module, use_environment)
   22.                       └─reticulate:::python_config(...)
   23.                         └─reticulate:::python_config_impl(python)
   24.                           └─base::system2(...)
  ── Error ('test_dnnsurv.R:16:3'): custom ───────────────────────────────────────
  <cmdError/error/condition>
  Error in `system2(command = python, args = shQuote(script), stdout = TRUE, 
      stderr = FALSE)`: error in running command
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_dnnsurv.R:16:2
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─survivalmodels::dnnsurv(...)
   10. └─survivalmodels::build_keras_net(5L, 1L)
   11.   └─keras::keras_model_sequential()
   12.     ├─keras$models
   13.     └─reticulate:::`$.python.builtin.module`(keras, "models")
   14.       └─reticulate:::py_resolve_module_proxy(x)
   15.         └─reticulate::py_config_error_message(...)
   16.           └─reticulate::py_config()
   17.             └─reticulate:::ensure_python_initialized()
   18.               └─reticulate:::initialize_python()
   19.                 └─(function() {...
   20.                   └─reticulate::py_discover_config(required_module, use_environment)
   21.                     └─reticulate:::python_config(...)
   22.                       └─reticulate:::python_config_impl(python)
   23.                         └─base::system2(...)
  ── Error ('test_dnnsurv.R:22:3'): early stopping ───────────────────────────────
  <cmdError/error/condition>
  Error in `system2(command = python, args = shQuote(script), stdout = TRUE, 
      stderr = FALSE)`: error in running command
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_dnnsurv.R:22:2
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─survivalmodels::dnnsurv(...)
   10.   └─keras::keras_model_sequential()
   11.     ├─keras$models
   12.     └─reticulate:::`$.python.builtin.module`(keras, "models")
   13.       └─reticulate:::py_resolve_module_proxy(x)
   14.         └─reticulate::py_config_error_message(...)
   15.           └─reticulate::py_config()
   16.             └─reticulate:::ensure_python_initialized()
   17.               └─reticulate:::initialize_python()
   18.                 └─(function() {...
   19.                   └─reticulate::py_discover_config(required_module, use_environment)
   20.                     └─reticulate:::python_config(...)
   21.                       └─reticulate:::python_config_impl(python)
   22.                         └─base::system2(...)
  ── Error ('test_dnnsurv.R:26:1'): (code run outside of `test_that()`) ──────────
  <cmdError/error/condition>
  Error in `system2(command = python, args = shQuote(script), stdout = TRUE, 
      stderr = FALSE)`: error in running command
  Backtrace:
       ▆
    1. └─survivalmodels::dnnsurv(...) at test_dnnsurv.R:26:0
    2.   └─keras::keras_model_sequential()
    3.     ├─keras$models
    4.     └─reticulate:::`$.python.builtin.module`(keras, "models")
    5.       └─reticulate:::py_resolve_module_proxy(x)
    6.         └─reticulate::py_config_error_message(...)
    7.           └─reticulate::py_config()
    8.             └─reticulate:::ensure_python_initialized()
    9.               └─reticulate:::initialize_python()
   10.                 └─(function() {...
   11.                   └─reticulate::py_discover_config(required_module, use_environment)
   12.                     └─reticulate:::python_config(...)
   13.                       └─reticulate:::python_config_impl(python)
   14.                         └─base::system2(...)
  ── Error ('test_keras.R:5:3'): get_keras_optimizer ─────────────────────────────
  <cmdError/error/condition>
  Error in `system2(command = python, args = shQuote(script), stdout = TRUE, 
      stderr = FALSE)`: error in running command
  Backtrace:
       ▆
    1. ├─testthat::expect_is(get_keras_optimizer("adadelta"), "keras.optimizer_v2.adadelta.Adadelta") at test_keras.R:5:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─survivalmodels::get_keras_optimizer("adadelta")
    5.   └─keras::optimizer_adadelta()
    6.     ├─base::do.call(keras$optimizers$Adadelta, args)
    7.     ├─keras$optimizers
    8.     └─reticulate:::`$.python.builtin.module`(keras, "optimizers")
    9.       └─reticulate:::py_resolve_module_proxy(x)
   10.         └─reticulate::py_config_error_message(...)
   11.           └─reticulate::py_config()
   12.             └─reticulate:::ensure_python_initialized()
   13.               └─reticulate:::initialize_python()
   14.                 └─(function() {...
   15.                   └─reticulate::py_discover_config(required_module, use_environment)
   16.                     └─reticulate:::python_config(...)
   17.                       └─reticulate:::python_config_impl(python)
   18.                         └─base::system2(...)
  
  [ FAIL 5 | WARN 0 | SKIP 10 | PASS 18 ]
  Error: Test failures
  Execution halted