Running ‘testthat.R’ [286s/354s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > library(xgboost)
  > library(randomForest)
  randomForest 4.6-14
  Type rfNews() to see new features/changes/bug fixes.
  > library(kernlab)
  > library(earth)
  Loading required package: Formula
  Loading required package: plotmo
  Loading required package: plotrix
  Loading required package: TeachingDemos
  > library(thief)
  Loading required package: forecast
  > library(smooth)
  Loading required package: greybox
  Package "greybox", v1.0.2 loaded.
  
  
  Attaching package: 'greybox'
  
  The following object is masked from 'package:forecast':
  
      forecast
  
  This is package "smooth", v3.1.4
  
  > library(greybox)
  > 
  > library(stats)
  > 
  > library(tidymodels)
  ── Attaching packages ────────────────────────────────────── tidymodels 0.1.4 ──
  ✔ broom        0.7.10     ✔ recipes      0.1.17
  ✔ dials        0.0.10     ✔ rsample      0.1.1 
  ✔ dplyr        1.0.7      ✔ tibble       3.1.6 
  ✔ ggplot2      3.3.5      ✔ tidyr        1.1.4 
  ✔ infer        1.0.0      ✔ tune         0.1.6 
  ✔ modeldata    0.1.1      ✔ workflows    0.2.4 
  ✔ parsnip      0.1.7      ✔ workflowsets 0.1.0 
  ✔ purrr        0.3.4      ✔ yardstick    0.0.9 
  ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
  ✖ yardstick::accuracy() masks forecast::accuracy()
  ✖ ggplot2::alpha()      masks scales::alpha(), kernlab::alpha()
  ✖ dplyr::combine()      masks randomForest::combine()
  ✖ purrr::cross()        masks kernlab::cross()
  ✖ purrr::discard()      masks scales::discard()
  ✖ dplyr::filter()       masks stats::filter()
  ✖ purrr::is_null()      masks testthat::is_null()
  ✖ dplyr::lag()          masks stats::lag()
  ✖ ggplot2::margin()     masks randomForest::margin()
  ✖ tidyr::matches()      masks rsample::matches(), dplyr::matches(), testthat::matches()
  ✖ dplyr::slice()        masks xgboost::slice()
  ✖ tidyr::spread()       masks greybox::spread()
  ✖ recipes::step()       masks stats::step()
  • Use suppressPackageStartupMessages() to eliminate package startup messages
  > library(parsnip)
  > library(workflows)
  > library(rsample)
  > library(recipes)
  > library(tune)
  > library(dials)
  > library(TSrepr)
  
  Attaching package: 'TSrepr'
  
  The following objects are masked from 'package:yardstick':
  
      mae, mape, mase, rmse, smape
  
  > library(yardstick)
  > library(slider)
  > 
  > library(timetk)
  > library(modeltime)
  
  Attaching package: 'modeltime'
  
  The following object is masked from 'package:TSrepr':
  
      maape
  
  The following object is masked from 'package:kernlab':
  
      error
  
  > 
  > library(tidyverse)
  ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
  ✔ readr   2.1.1     ✔ forcats 0.5.1
  ✔ stringr 1.4.0     
  ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
  ✖ ggplot2::alpha()       masks scales::alpha(), kernlab::alpha()
  ✖ readr::col_factor()    masks scales::col_factor()
  ✖ dplyr::combine()       masks randomForest::combine()
  ✖ purrr::cross()         masks kernlab::cross()
  ✖ purrr::discard()       masks scales::discard()
  ✖ readr::edition_get()   masks testthat::edition_get()
  ✖ dplyr::filter()        masks stats::filter()
  ✖ stringr::fixed()       masks recipes::fixed()
  ✖ purrr::is_null()       masks testthat::is_null()
  ✖ dplyr::lag()           masks stats::lag()
  ✖ readr::local_edition() masks testthat::local_edition()
  ✖ ggplot2::margin()      masks randomForest::margin()
  ✖ tidyr::matches()       masks rsample::matches(), dplyr::matches(), testthat::matches()
  ✖ dplyr::slice()         masks xgboost::slice()
  ✖ readr::spec()          masks yardstick::spec()
  ✖ tidyr::spread()        masks greybox::spread()
  > library(lubridate)
  
  Attaching package: 'lubridate'
  
  The following object is masked from 'package:greybox':
  
      hm
  
  The following objects are masked from 'package:base':
  
      date, intersect, setdiff, union
  
  > 
  > 
  > test_check("modeltime")
  OMP: Warning #96: Cannot form a team with 24 threads, using 2 instead.
  OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
  # A tibble: 2 × 2
    .model_id .model
        <int> <list>
  1         1 <NULL>
  2         3 <NULL>
  
  
  
  
  
  
  
  
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (13)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-algo-adam_reg-Adam.R:159:1): (code run outside of `test_that()`) ──
  Error: The provided data is not numeric! Can't construct any model!
  Backtrace:
       █
    1. ├─wflw %>% fit(training(splits)) test-algo-adam_reg-Adam.R:159:0
    2. ├─generics::fit(., training(splits))
    3. ├─workflows:::fit.workflow(., training(splits))
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. ├─modeltime::adam_fit_impl(...)
   15. │ └─rlang::eval_tidy(fit_call)
   16. └─smooth::adam(...)
   17.   └─smooth:::parametersChecker(...)
  ── Error (test-algo-adam_reg-auto_adam.R:155:1): (code run outside of `test_that()`) ──
  Error: The provided data is not numeric! Can't construct any model!
  Backtrace:
       █
    1. ├─wflw %>% fit(training(splits)) test-algo-adam_reg-auto_adam.R:155:0
    2. ├─generics::fit(., training(splits))
    3. ├─workflows:::fit.workflow(., training(splits))
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. ├─modeltime::auto_adam_fit_impl(...)
   15. │ └─rlang::eval_tidy(fit_call)
   16. └─smooth::auto.adam(...)
   17.   └─smooth:::adamReturner(...)
   18.     └─smooth::adam(...)
   19.       └─smooth:::parametersChecker(...)
  ── Error (test-algo-exp_smoothing-ets.R:165:1): (code run outside of `test_that()`) ──
  Error in `x - out$fitted`: non-numeric argument to binary operator
  Backtrace:
       █
    1. ├─wflw %>% fit(training(splits)) test-algo-exp_smoothing-ets.R:165:0
    2. ├─generics::fit(., training(splits))
    3. ├─workflows:::fit.workflow(., training(splits))
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. └─modeltime::croston_fit_impl(x = maybe_data_frame(x), y = y, alpha = 0.2)
   15.   └─forecast::croston(...)
  ── Error (test-algo-prophet_boost.R:220:5): prophet_boost: prophet_xgboost (workflow) ──
  Error in `setup_dataframe(m, history, initialize_scales = TRUE)`: 'list' object cannot be coerced to type 'double'
  Backtrace:
       █
    1. ├─wflw %>% fit(training(splits)) test-algo-prophet_boost.R:220:4
    2. ├─generics::fit(., training(splits))
    3. ├─workflows:::fit.workflow(., training(splits))
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. └─modeltime::prophet_xgboost_fit_impl(...)
   15.   └─prophet::prophet(...)
   16.     └─prophet::fit.prophet(m, df, ...)
   17.       └─prophet:::setup_dataframe(m, history, initialize_scales = TRUE)
  ── Error (test-algo-prophet_reg.R:192:5): prophet_reg: prophet (workflow), Test Model Fit Object ──
  Error in `setup_dataframe(m, history, initialize_scales = TRUE)`: 'list' object cannot be coerced to type 'double'
  Backtrace:
       █
    1. ├─wflw %>% fit(training(splits)) test-algo-prophet_reg.R:192:4
    2. ├─generics::fit(., training(splits))
    3. ├─workflows:::fit.workflow(., training(splits))
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. └─modeltime::prophet_fit_impl(...)
   15.   └─prophet::fit.prophet(m, df)
   16.     └─prophet:::setup_dataframe(m, history, initialize_scales = TRUE)
  ── Error (test-algo-temporal_hierarchy.R:89:1): (code run outside of `test_that()`) ──
  <vctrs_error_subscript_oob/vctrs_error_subscript/rlang_error/error/condition>
  Error: Can't rename columns that don't exist.
  ✖ Column `value` doesn't exist.
  Backtrace:
       █
    1. ├─wflw %>% fit(training(splits)) test-algo-temporal_hierarchy.R:89:0
    2. ├─generics::fit(., training(splits))
    3. ├─workflows:::fit.workflow(., training(splits))
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. ├─modeltime::temporal_hier_fit_impl(x = maybe_data_frame(x), y = y)
   15. │ └─`%>%`(...)
   16. ├─dplyr::rename(., residuals = value)
   17. └─dplyr:::rename.data.frame(., residuals = value)
   18.   └─tidyselect::eval_rename(expr(c(...)), .data)
   19.     └─tidyselect:::rename_impl(...)
   20.       └─tidyselect:::eval_select_impl(...)
   21.         ├─tidyselect:::with_subscript_errors(...)
   22.         │ ├─base::tryCatch(...)
   23.         │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   24.         │ │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   25.         │ │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
   26.         │ └─tidyselect:::instrument_base_errors(expr)
   27.         │   └─base::withCallingHandlers(...)
   28.         └─tidyselect:::vars_select_eval(...)
   29.           └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   30.             └─tidyselect:::eval_c(expr, data_mask, context_mask)
   31.               └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   32.                 └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
   33.                   └─tidyselect:::as_indices_sel_impl(...)
   34.                     └─tidyselect:::as_indices_impl(x, vars, strict = strict)
   35.                       └─tidyselect:::chr_as_locations(x, vars)
   36.                         └─vctrs::vec_as_location(x, n = length(vars), names = vars)
   37.                           └─(function () ...
   38.                             └─vctrs:::stop_subscript_oob(...)
   39.                               └─vctrs:::stop_subscript(...)
  ── Error (test-algo-window_reg.R:107:5): NAIVE - Check New Factors ─────────────
  <dplyr_error/rlang_error/error/condition>
  Error: Problem with `filter()` input `..1`.
  ℹ Input `..1` is `.model_desc == "ACTUAL" | .key == "prediction"`.
  ✖ object '.key' not found
  Backtrace:
       █
    1. ├─testthat::expect_warning(...) test-algo-window_reg.R:107:4
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─`%>%`(...) test-algo-window_reg.R:108:8
    7. ├─modeltime::modeltime_forecast(...)
    8. ├─modeltime:::modeltime_forecast.mdl_time_tbl(...)
    9. │ └─ret %>% dplyr::filter(.model_desc == "ACTUAL" | .key == "prediction")
   10. ├─dplyr::filter(., .model_desc == "ACTUAL" | .key == "prediction")
   11. ├─dplyr:::filter.data.frame(...)
   12. │ └─dplyr:::filter_rows(.data, ..., caller_env = caller_env())
   13. │   ├─base::withCallingHandlers(...)
   14. │   └─mask$eval_all_filter(dots, env_filter)
   15. └─base::.handleSimpleError(...)
   16.   └─dplyr:::h(simpleError(msg, call))
  ── Failure (test-algo-window_reg.R:273:5): SNAIVE - Check New Factors ──────────
  `future_forecast_vec` not equal to rep_len(NA_real_, 60).
  Modes: list, numeric
  Component 1: target is NULL, current is numeric
  Component 2: target is NULL, current is numeric
  Component 3: target is NULL, current is numeric
  Component 4: target is NULL, current is numeric
  Component 5: target is NULL, current is numeric
  Component 6: target is NULL, current is numeric
  Component 7: target is NULL, current is numeric
  Component 8: target is NULL, current is numeric
  ...
  ── Error (test-fit_workflowsets.R:56:5): Sequential - workflowset is correct order ──
  Error: `x` must be a workflow, not a NULL.
  Backtrace:
      █
   1. ├─testthat::expect_true(...) test-fit_workflowsets.R:56:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::identical(...)
   5. ├─model_tbl$.model[[model_id]] %>% pull_workflow_preprocessor()
   6. └─workflows::pull_workflow_preprocessor(.)
   7.   └─workflows:::validate_is_workflow(x)
   8.     └─workflows:::glubort("{arg} must be a workflow, not a {class(x)[[1]]}.")
  ── Failure (test-nested-modeltime.R:117:5): modeltime_nested_fit: Good + Bad Model ──
  ncol(acc_tbl) not equal to 10.
  1/1 mismatches
  [1] 3 - 10 == -7
  ── Failure (test-nested-modeltime.R:121:5): modeltime_nested_fit: Good + Bad Model ──
  nrow(err_tbl) not equal to 4.
  1/1 mismatches
  [1] 6 - 4 == 2
  ── Failure (test-nested-modeltime.R:128:5): modeltime_nested_fit: Good + Bad Model ──
  nrow(fcast_tbl) not equal to 312.
  1/1 mismatches
  [1] 0 - 312 == -312
  ── Failure (test-nested-modeltime.R:129:5): modeltime_nested_fit: Good + Bad Model ──
  ncol(fcast_tbl) not equal to 8.
  1/1 mismatches
  [1] 0 - 8 == -8
  ── Failure (test-nested-modeltime.R:134:5): modeltime_nested_fit: Good + Bad Model ──
  nrow(fcast_tbl) not equal to 104.
  1/1 mismatches
  [1] 0 - 104 == -104
  ── Failure (test-nested-modeltime.R:135:5): modeltime_nested_fit: Good + Bad Model ──
  ncol(fcast_tbl) not equal to 8.
  1/1 mismatches
  [1] 0 - 8 == -8
  ── Failure (test-nested-modeltime.R:140:5): modeltime_nested_fit: Good + Bad Model ──
  nrow(fcast_tbl) not equal to 52.
  1/1 mismatches
  [1] 0 - 52 == -52
  ── Failure (test-nested-modeltime.R:141:5): modeltime_nested_fit: Good + Bad Model ──
  ncol(fcast_tbl) not equal to 8.
  1/1 mismatches
  [1] 0 - 8 == -8
  ── Error (test-nested-modeltime.R:145:5): modeltime_nested_fit: Good + Bad Model ──
  Error: metric: rsq is not detected. Please review the accuracy table with `extract_nested_test_accuracy()`.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test-nested-modeltime.R:145:4
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─`%>%`(...)
   7. └─modeltime::modeltime_nested_select_best(., metric = "rsq", minimize = FALSE)
  ── Error (test-panel-data.R:16:1): (code run outside of `test_that()`) ─────────
  Error in `setup_dataframe(m, history, initialize_scales = TRUE)`: 'list' object cannot be coerced to type 'double'
  Backtrace:
       █
    1. ├─`%>%`(...) test-panel-data.R:16:0
    2. ├─generics::fit(., data_set)
    3. ├─workflows:::fit.workflow(., data_set)
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. └─modeltime::prophet_xgboost_fit_impl(...)
   15.   └─prophet::prophet(...)
   16.     └─prophet::fit.prophet(m, df, ...)
   17.       └─prophet:::setup_dataframe(m, history, initialize_scales = TRUE)
  ── Error (test-recursive.R:125:3): recursive 2 - single / transform func / workflow ──
  Error: `x` cannot be a vector.
  Backtrace:
       █
    1. ├─`%>%`(...) test-recursive.R:125:2
    2. ├─generics::fit(., train_data)
    3. └─workflows:::fit.workflow(., train_data)
    4.   └─workflows::.fit_model(workflow, control)
    5.     ├─generics::fit(action_model, workflow = workflow, control = control)
    6.     └─workflows:::fit.action_model(...)
    7.       └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8.         ├─generics::fit_xy(...)
    9.         └─parsnip::fit_xy.model_spec(...)
   10.           └─parsnip:::xy_form(...)
   11.             └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-recursive.R:242:3): recursive 3 - panel / function / parsnip + workflow ──
  Error: `x` cannot be a vector.
  Backtrace:
       █
    1. ├─`%>%`(...) test-recursive.R:242:2
    2. ├─modeltime::recursive(...)
    3. ├─generics::fit(., train_data)
    4. └─workflows:::fit.workflow(., train_data)
    5.   └─workflows::.fit_model(workflow, control)
    6.     ├─generics::fit(action_model, workflow = workflow, control = control)
    7.     └─workflows:::fit.action_model(...)
    8.       └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    9.         ├─generics::fit_xy(...)
   10.         └─parsnip::fit_xy.model_spec(...)
   11.           └─parsnip:::xy_form(...)
   12.             └─parsnip::.convert_xy_to_form_fit(...)
  
  [ FAIL 21 | WARN 5 | SKIP 13 | PASS 518 ]
  Error: Test failures
  Execution halted