Running ‘testthat.R’ [16m/17m]
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/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(spinner)
  > 
  > test_check("spinner")
  epoch:  10    Train loss:  0.5206071    Val loss:  0.7629738 
  epoch:  20    Train loss:  0.692533    Val loss:  0.6967654 
  epoch:  30    Train loss:  0.5018971    Val loss:  0.6652126 
  early stop at epoch:  31    Train loss:  0.5264022    Val loss:  0.7419146 
  epoch:  10    Train loss:  0.6658432    Val loss:  0.6710406 
  epoch:  20    Train loss:  0.6566378    Val loss:  0.6531721 
  epoch:  10    Train loss:  0.6967562    Val loss:  0.7932751 
  epoch:  20    Train loss:  0.6904271    Val loss:  0.7908868 
  epoch:  30    Train loss:  0.5593812    Val loss:  0.7645096 
  early stop at epoch:  35    Train loss:  0.6424293    Val loss:  0.8097705 
  epoch:  10    Train loss:  0.7666908    Val loss:  0.768415 
  epoch:  20    Train loss:  0.777707    Val loss:  0.7530576 
  epoch:  30    Train loss:  0.7620533    Val loss:  0.7683229 
  early stop at epoch:  36    Train loss:  0.7171982    Val loss:  0.7655155 
  epoch:  10    Train loss:  0.72602    Val loss:  0.6336625 
  epoch:  20    Train loss:  0.7550309    Val loss:  0.619078 
  epoch:  30    Train loss:  0.6972495    Val loss:  0.8546136 
  early stop at epoch:  30    Train loss:  0.6972495    Val loss:  0.8546136 
  epoch:  10    Train loss:  0.6882808    Val loss:  0.5277001 
  epoch:  20    Train loss:  0.7042437    Val loss:  0.5034757 
  epoch:  30    Train loss:  0.686868    Val loss:  0.4890618 
  epoch:  40    Train loss:  0.6814035    Val loss:  0.5537034 
  epoch:  50    Train loss:  0.679831    Val loss:  0.5314658 
  epoch:  60    Train loss:  0.686273    Val loss:  0.5206559 
  epoch:  70    Train loss:  0.672634    Val loss:  0.5409217 
  early stop at epoch:  72    Train loss:  0.690446    Val loss:  0.5231133 
  time: 182.839 sec elapsed
  epoch:  10    Train loss:  0.3026671    Val loss:  0.2128231 
  epoch:  20    Train loss:  0.3361006    Val loss:  0.2349247 
  epoch:  30    Train loss:  0.4082164    Val loss:  0.2217312 
  epoch:  40    Train loss:  0.3327962    Val loss:  0.2942288 
  early stop at epoch:  46    Train loss:  0.2859361    Val loss:  0.359625 
  epoch:  10    Train loss:  0.344774    Val loss:  0.2797248 
  epoch:  20    Train loss:  0.3387569    Val loss:  0.3678934 
  epoch:  30    Train loss:  0.3268932    Val loss:  0.2547124 
  early stop at epoch:  39    Train loss:  0.2902773    Val loss:  0.4280362 
  epoch:  10    Train loss:  0.2550901    Val loss:  0.2067848 
  epoch:  20    Train loss:  0.2326315    Val loss:  0.5664619 
  epoch:  30    Train loss:  0.2270289    Val loss:  0.4026011 
  early stop at epoch:  30    Train loss:  0.2270289    Val loss:  0.4026011 
  epoch:  10    Train loss:  0.3091125    Val loss:  0.2960624 
  epoch:  20    Train loss:  0.2793294    Val loss:  0.3277531 
  epoch:  30    Train loss:  0.3043242    Val loss:  0.2574992 
  early stop at epoch:  36    Train loss:  0.2742454    Val loss:  0.4460754 
  time: 145.345 sec elapsed
  epoch:  10    Train loss:  0.6465556    Val loss:  0.4955338 
  epoch:  20    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  30    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  40    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  50    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  60    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  70    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  80    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  90    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  100    Train loss:  0.6465556    Val loss:  0.5114039 
  epoch:  10    Train loss:  0.7021202    Val loss:  0.6696711 
  epoch:  20    Train loss:  0.7021202    Val loss:  0.6696711 
  epoch:  30    Train loss:  0.7032326    Val loss:  0.6696711 
  epoch:  40    Train loss:  0.7021202    Val loss:  0.6718664 
  epoch:  50    Train loss:  0.7021202    Val loss:  0.6696711 
  epoch:  60    Train loss:  0.6982032    Val loss:  0.6696711 
  epoch:  70    Train loss:  0.7021202    Val loss:  0.7096452 
  epoch:  80    Train loss:  0.7021202    Val loss:  0.6696711 
  epoch:  90    Train loss:  0.7021202    Val loss:  0.6696711 
  epoch:  100    Train loss:  0.7021202    Val loss:  0.6696711 
  epoch:  10    Train loss:  0.7007673    Val loss:  0.631752 
  epoch:  20    Train loss:  0.7007673    Val loss:  0.631752 
  epoch:  30    Train loss:  0.7271265    Val loss:  0.631752 
  epoch:  40    Train loss:  0.699743    Val loss:  0.6324406 
  epoch:  50    Train loss:  0.7217113    Val loss:  0.631752 
  epoch:  60    Train loss:  0.7007673    Val loss:  0.6777689 
  epoch:  70    Train loss:  0.7245714    Val loss:  0.631752 
  epoch:  80    Train loss:  0.7007673    Val loss:  0.6862568 
  early stop at epoch:  86    Train loss:  0.7215076    Val loss:  0.640824 
  time: 130.349 sec elapsed
  epoch:  10    Train loss:  0.8087506    Val loss:  0.5473623 
  epoch:  20    Train loss:  0.8186604    Val loss:  0.513293 
  epoch:  30    Train loss:  0.8186604    Val loss:  0.5209054 
  epoch:  40    Train loss:  0.8186604    Val loss:  0.517107 
  epoch:  50    Train loss:  0.8186604    Val loss:  0.5176126 
  epoch:  60    Train loss:  0.8186604    Val loss:  0.5407484 
  epoch:  70    Train loss:  0.8186604    Val loss:  0.5176126 
  epoch:  80    Train loss:  0.8186604    Val loss:  0.4984773 
  epoch:  90    Train loss:  0.8186604    Val loss:  0.5200096 
  epoch:  100    Train loss:  0.8087506    Val loss:  0.5448586 
  epoch:  10    Train loss:  0.6650466    Val loss:  0.7216609 
  epoch:  20    Train loss:  0.6650466    Val loss:  0.690927 
  epoch:  30    Train loss:  0.6650466    Val loss:  0.6940672 
  early stop at epoch:  35    Train loss:  0.6650466    Val loss:  0.7257167 
  epoch:  10    Train loss:  0.4568773    Val loss:  0.4651889 
  epoch:  20    Train loss:  0.4427699    Val loss:  0.4923788 
  epoch:  30    Train loss:  0.4427699    Val loss:  0.4619347 
  early stop at epoch:  32    Train loss:  0.4427699    Val loss:  0.5436771 
  time: 74.418 sec elapsed
  epoch:  10    Train loss:  0.5837668    Val loss:  0.6920825 
  epoch:  20    Train loss:  0.541101    Val loss:  0.6583152 
  epoch:  30    Train loss:  0.5264405    Val loss:  0.6630518 
  early stop at epoch:  32    Train loss:  0.4919579    Val loss:  0.7210969 
  epoch:  10    Train loss:  0.4362365    Val loss:  0.5073944 
  epoch:  20    Train loss:  0.4864609    Val loss:  0.2430749 
  epoch:  30    Train loss:  0.4113717    Val loss:  0.5282634 
  early stop at epoch:  35    Train loss:  0.153684    Val loss:  0.5677856 
  epoch:  10    Train loss:  0.5130763    Val loss:  0.5892535 
  epoch:  20    Train loss:  0.5532482    Val loss:  0.5999739 
  epoch:  30    Train loss:  0.5262614    Val loss:  0.5713801 
  early stop at epoch:  31    Train loss:  0.5043253    Val loss:  0.6363896 
  time: 121.526 sec elapsed
  random search: 326.306 sec elapsed
  epoch:  10    Train loss:  0.07086422    Val loss:  0.1375223 
  epoch:  20    Train loss:  0.07086422    Val loss:  0.07086423 
  epoch:  30    Train loss:  0.07086422    Val loss:  0.1448998 
  early stop at epoch:  35    Train loss:  0.07086422    Val loss:  0.1651878 
  epoch:  10    Train loss:  0.2014559    Val loss:  0.1184543 
  epoch:  20    Train loss:  0.1184542    Val loss:  0.1184543 
  epoch:  30    Train loss:  0.1184542    Val loss:  0.1510096 
  early stop at epoch:  36    Train loss:  0.1184542    Val loss:  0.1532382 
  epoch:  10    Train loss:  0.08458351    Val loss:  0.2593073 
  epoch:  20    Train loss:  0.2409408    Val loss:  0.05270579 
  epoch:  30    Train loss:  0.2321048    Val loss:  0.1185036 
  early stop at epoch:  30    Train loss:  0.2321048    Val loss:  0.1185036 
  time: 44.318 sec elapsed
  epoch:  10    Train loss:  0.1711449    Val loss:  0.6901896 
  epoch:  20    Train loss:  0.1711449    Val loss:  0.7201604 
  epoch:  30    Train loss:  0.2374731    Val loss:  0.7296348 
  early stop at epoch:  32    Train loss:  0.1711449    Val loss:  0.751559 
  epoch:  10    Train loss:  0.8913957    Val loss:  0.6050254 
  epoch:  20    Train loss:  0.8913957    Val loss:  0.6443452 
  epoch:  30    Train loss:  0.8913957    Val loss:  0.6313393 
  epoch:  40    Train loss:  0.8981407    Val loss:  0.6274613 
  epoch:  50    Train loss:  0.8913957    Val loss:  0.6050254 
  epoch:  60    Train loss:  0.8936972    Val loss:  0.627995 
  epoch:  70    Train loss:  0.8913957    Val loss:  0.6046396 
  epoch:  80    Train loss:  0.8913957    Val loss:  0.7103514 
  epoch:  90    Train loss:  0.8856102    Val loss:  0.6050254 
  epoch:  100    Train loss:  0.8913957    Val loss:  0.6402048 
  epoch:  10    Train loss:  0.7578951    Val loss:  0.6487317 
  epoch:  20    Train loss:  0.755585    Val loss:  0.6480615 
  epoch:  30    Train loss:  0.7737332    Val loss:  0.7086629 
  epoch:  40    Train loss:  0.7802494    Val loss:  0.6892929 
  early stop at epoch:  40    Train loss:  0.7802494    Val loss:  0.6892929 
  time: 76.699 sec elapsed
  epoch:  10    Train loss:  0.3102549    Val loss:  0.846304 
  epoch:  20    Train loss:  0.3442138    Val loss:  0.8198994 
  epoch:  30    Train loss:  0.3413275    Val loss:  0.8889039 
  early stop at epoch:  30    Train loss:  0.3413275    Val loss:  0.8889039 
  epoch:  10    Train loss:  0.935106    Val loss:  0.690149 
  epoch:  20    Train loss:  0.9157618    Val loss:  0.6939839 
  epoch:  30    Train loss:  0.9420475    Val loss:  0.6686194 
  epoch:  40    Train loss:  0.9236212    Val loss:  0.6911446 
  epoch:  50    Train loss:  0.9438332    Val loss:  0.7738773 
  epoch:  60    Train loss:  0.9300352    Val loss:  0.7295524 
  epoch:  70    Train loss:  0.9311644    Val loss:  0.709401 
  epoch:  80    Train loss:  0.9523125    Val loss:  0.7518958 
  epoch:  90    Train loss:  0.9271222    Val loss:  0.7417283 
  epoch:  100    Train loss:  0.9529463    Val loss:  0.783016 
  epoch:  10    Train loss:  0.7512749    Val loss:  0.8617536 
  epoch:  20    Train loss:  0.7868204    Val loss:  0.8830751 
  epoch:  30    Train loss:  0.7896664    Val loss:  0.8411684 
  early stop at epoch:  31    Train loss:  0.8149496    Val loss:  0.9225895 
  time: 195.053 sec elapsed
  random search: 316.085 sec elapsed
  [ FAIL 1 | WARN 62 | SKIP 0 | PASS 44 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test.R:14:13'): Correct outcome format and size for base outcome1 ───
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `pmap(list(cv_models, train_idx, val_idx), ~training_function(model = ..1, 
      direction, node_features, edge_features, edge_list, ..2, 
      ..3, context_features, target, target_schema, optimization, 
      weight_decay, lr, epochs, patience, verbose, dev, update_order, 
      skip_shortcut))`: i In index: 2.
  Caused by error in `Tensor_slice()`:
  ! Unsupported index.
  Backtrace:
       ▆
    1. ├─spinner::spinner(...) at test.R:14:13
    2. │ └─purrr::pmap(...)
    3. │   └─purrr:::pmap_("list", .l, .f, ..., .progress = .progress)
    4. │     ├─purrr:::with_indexed_errors(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     ├─purrr:::call_with_cleanup(...)
    7. │     └─spinner (local) .f(.l[[1L]][[i]], .l[[2L]][[i]], .l[[3L]][[i]], ...)
    8. │       └─spinner:::training_function(...)
    9. │         ├─torch::torch_cat(...)
   10. │         │ └─base::mget(x = c("tensors", "dim"))
   11. │         └─spinner (local) model(...)
   12. │           └─self[[lyr]](...)
   13. │             └─self$edge_to_node(...)
   14. │               └─base::mapply(...)
   15. │                 └─spinner (local) `<fn>`(i = dots[[1L]][[10L]])
   16. │                   ├─transformed_edge_features[from_node == i, ]
   17. │                   └─torch:::`[.torch_tensor`(...)
   18. │                     └─torch:::tensor_slice(x, ..., drop = drop)
   19. │                       └─torch:::Tensor_slice(tensor, environment(), drop = drop, mask = .d)
   20. ├─base::stop(`<Rcpp::xc>`)
   21. └─purrr (local) `<fn>`(`<Rcpp::xc>`)
   22.   └─cli::cli_abort(...)
   23.     └─rlang::abort(...)
  
  [ FAIL 1 | WARN 62 | SKIP 0 | PASS 44 ]
  Error: Test failures
  Execution halted