Running 'testthat.R' [59s/65s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > 
  > # Machine Learning
  > library(tidymodels)
  -- Attaching packages -------------------------------------- tidymodels 0.1.1 --
  v broom     0.7.2      v recipes   0.1.14
  v dials     0.0.9      v rsample   0.0.8 
  v dplyr     1.0.2      v tibble    3.0.4 
  v ggplot2   3.3.2      v tidyr     1.1.2 
  v infer     0.5.3      v tune      0.1.1 
  v modeldata 0.1.0      v workflows 0.2.1 
  v parsnip   0.1.4      v yardstick 0.0.7 
  v purrr     0.3.4      
  -- Conflicts ----------------------------------------- tidymodels_conflicts() --
  x purrr::discard() masks scales::discard()
  x dplyr::filter()  masks stats::filter()
  x purrr::is_null() masks testthat::is_null()
  x dplyr::lag()     masks stats::lag()
  x tidyr::matches() masks dplyr::matches(), testthat::matches()
  x recipes::step()  masks stats::step()
  > library(modeltime)
  > library(modeltime.ensemble)
  Loading required package: modeltime.resample
  > library(modeltime.resample)
  > 
  > library(xgboost)
  
  Attaching package: 'xgboost'
  
  The following object is masked from 'package:dplyr':
  
      slice
  
  > 
  > # Core Packages
  > library(tidyverse)
  -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
  v readr   1.4.0     v forcats 0.5.0
  v stringr 1.4.0     
  -- Conflicts ------------------------------------------ tidyverse_conflicts() --
  x readr::col_factor() masks scales::col_factor()
  x purrr::discard()    masks scales::discard()
  x dplyr::filter()     masks stats::filter()
  x stringr::fixed()    masks recipes::fixed()
  x purrr::is_null()    masks testthat::is_null()
  x dplyr::lag()        masks stats::lag()
  x tidyr::matches()    masks dplyr::matches(), testthat::matches()
  x xgboost::slice()    masks dplyr::slice()
  x readr::spec()       masks yardstick::spec()
  > library(timetk)
  > library(lubridate)
  
  Attaching package: 'lubridate'
  
  The following objects are masked from 'package:base':
  
      date, intersect, setdiff, union
  
  > 
  > test_check("modeltime.ensemble")
  -- Modeltime Ensemble -------------------------------------------
  Ensemble of 3 Models (MEDIAN)
  
  # Modeltime Table
  # A tibble: 3 x 3
    .model_id .model     .model_desc            
        <int> <list>     <chr>                  
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  2         2 <workflow> PROPHET                
  3         3 <workflow> GLMNET                 
  -- Warning (test-ensemble_average.R:43:5): ensemble_average(type = 'median') ---
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_average.R:43:5): ensemble_average(type = 'median') ---
  Unknown or uninitialised column: `.key`.
  
  # A tibble: 1 x 4
    .model_id .model         .model_desc                 .nested.col
        <int> <list>         <chr>                       <lgl>      
  1         1 <ensemble [3]> ENSEMBLE (MEDIAN): 3 MODELS NA         
  -- ERROR (test-ensemble_average.R:43:5): ensemble_average(type = 'median') -----
  Error: All models failed Modeltime Calibration.
  Backtrace:
       x
    1. \-ensemble_fit_median %>% modeltime_calibrate(testing(m750_splits)) test-ensemble_average.R:43:4
    2.   +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
    3.   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    4.     \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    5.       \-modeltime.ensemble:::`_fseq`(`_lhs`)
    6.         \-magrittr::freduce(value, `_function_list`)
    7.           +-base::withVisible(function_list[[k]](value))
    8.           \-function_list[[k]](value)
    9.             +-modeltime::modeltime_calibrate(., testing(m750_splits))
   10.             \-modeltime.ensemble:::modeltime_calibrate.mdl_time_ensemble(...)
   11.               \-`%>%`(...)
   12.                 +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
   13.                 \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   14.                   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   15.                     \-modeltime.ensemble:::`_fseq`(`_lhs`)
   16.                       \-magrittr::freduce(value, `_function_list`)
   17.                         +-base::withVisible(function_list[[k]](value))
   18.                         \-function_list[[k]](value)
   19.                           +-modeltime::modeltime_calibrate(...)
   20.                           \-modeltime:::modeltime_calibrate.mdl_time_tbl(...)
   21.                             \-modeltime:::validate_modeltime_calibration(ret)
  
  -- Warning (test-ensemble_average.R:106:5): ensemble_average(type = 'mean') ----
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_average.R:106:5): ensemble_average(type = 'mean') ----
  Unknown or uninitialised column: `.key`.
  
  -- Warning (test-ensemble_average.R:106:5): ensemble_average(type = 'mean') ----
  Unknown or uninitialised column: `.key`.
  
  -- ERROR (test-ensemble_average.R:106:5): ensemble_average(type = 'mean') ------
  Error: Problem with `filter()` input `..1`.
  x object '.key' not found
  i Input `..1` is `.model_desc == "ACTUAL" | .key == "prediction"`.
  Backtrace:
       x
    1. +-modeltime_table(ensemble_fit_mean) %>% modeltime_forecast(testing(m750_splits)) test-ensemble_average.R:106:4
    2. | +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
    3. | \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    4. |   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    5. |     \-modeltime.ensemble:::`_fseq`(`_lhs`)
    6. |       \-magrittr::freduce(value, `_function_list`)
    7. |         +-base::withVisible(function_list[[k]](value))
    8. |         \-function_list[[k]](value)
    9. |           +-modeltime::modeltime_forecast(., testing(m750_splits))
   10. |           \-modeltime:::modeltime_forecast.mdl_time_tbl(., testing(m750_splits))
   11. |             \-ret %>% dplyr::filter(.model_desc == "ACTUAL" | .key == "prediction")
   12. |               +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
   13. |               \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   14. |                 \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   15. |                   \-modeltime:::`_fseq`(`_lhs`)
   16. |                     \-magrittr::freduce(value, `_function_list`)
   17. |                       +-base::withVisible(function_list[[k]](value))
   18. |                       \-function_list[[k]](value)
   19. |                         +-dplyr::filter(., .model_desc == "ACTUAL" | .key == "prediction")
   20. |                         \-dplyr:::filter.data.frame(...)
   21. |                           \-dplyr:::filter_rows(.data, ...)
   22. |                             +-base::withCallingHandlers(...)
   23. |                             \-mask$eval_all_filter(dots, env_filter)
   24. \-base::.handleSimpleError(...)
   25.   \-dplyr:::h(simpleError(msg, call))
  
  -- Fitting Non-Tunable Model Specification ----------------------
  
  # A tibble: 4 x 3
    .model_id  rmse .model_desc            
    <chr>     <dbl> <chr>                  
  1 1          579. ARIMA(0,1,1)(0,1,1)[12]
  2 2          381. PROPHET                
  3 3          558. GLMNET                 
  4 ensemble   128. ENSEMBLE (MODEL SPEC)  
  
  -- Final Model --------------------------------------------------
  
  == Workflow [trained] ==========================================================
  Preprocessor: Recipe
  Model: linear_reg()
  
  -- Preprocessor ----------------------------------------------------------------
  0 Recipe Steps
  
  -- Model -----------------------------------------------------------------------
  
  Call:
  stats::lm(formula = ..y ~ ., data = data)
  
  Coefficients:
  (Intercept)  .model_id_1  .model_id_2  .model_id_3  
   -2637.1730       0.5754      -0.1920       0.8551  
  
  
  0.979 sec elapsed
  
  -- Modeltime Ensemble -------------------------------------------
  Ensemble of 3 Models (LM STACK)
  
  # Modeltime Table
  # A tibble: 3 x 3
    .model_id .model     .model_desc            
        <int> <list>     <chr>                  
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  2         2 <workflow> PROPHET                
  3         3 <workflow> GLMNET                 
  -- Warning (test-ensemble_model_spec.R:53:5): ensemble_model_spec(): Linear Regr
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_model_spec.R:53:5): ensemble_model_spec(): Linear Regr
  Unknown or uninitialised column: `.key`.
  
  # A tibble: 1 x 4
    .model_id .model         .model_desc                   .nested.col
        <int> <list>         <chr>                         <lgl>      
  1         1 <ensemble [3]> ENSEMBLE (LM STACK): 3 MODELS NA         
  -- ERROR (test-ensemble_model_spec.R:53:5): ensemble_model_spec(): Linear Regres
  Error: All models failed Modeltime Calibration.
  Backtrace:
       x
    1. \-ensemble_fit_lm %>% modeltime_calibrate(testing(m750_splits)) test-ensemble_model_spec.R:53:4
    2.   +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
    3.   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    4.     \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    5.       \-modeltime.ensemble:::`_fseq`(`_lhs`)
    6.         \-magrittr::freduce(value, `_function_list`)
    7.           +-base::withVisible(function_list[[k]](value))
    8.           \-function_list[[k]](value)
    9.             +-modeltime::modeltime_calibrate(., testing(m750_splits))
   10.             \-modeltime.ensemble:::modeltime_calibrate.mdl_time_ensemble(...)
   11.               \-`%>%`(...)
   12.                 +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
   13.                 \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   14.                   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   15.                     \-modeltime.ensemble:::`_fseq`(`_lhs`)
   16.                       \-magrittr::freduce(value, `_function_list`)
   17.                         +-base::withVisible(function_list[[k]](value))
   18.                         \-function_list[[k]](value)
   19.                           +-modeltime::modeltime_calibrate(...)
   20.                           \-modeltime:::modeltime_calibrate.mdl_time_tbl(...)
   21.                             \-modeltime:::validate_modeltime_calibration(ret)
  
  -- Modeltime Ensemble -------------------------------------------
  Ensemble of 3 Models (GLMNET STACK)
  
  # Modeltime Table
  # A tibble: 3 x 3
    .model_id .model     .model_desc            
        <int> <list>     <chr>                  
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  2         2 <workflow> PROPHET                
  3         3 <workflow> GLMNET                 
  -- Warning (test-ensemble_model_spec.R:145:5): ensemble_model_spec(): GLMNET (Tu
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_model_spec.R:145:5): ensemble_model_spec(): GLMNET (Tu
  Unknown or uninitialised column: `.key`.
  
  # A tibble: 1 x 4
    .model_id .model         .model_desc                       .nested.col
        <int> <list>         <chr>                             <lgl>      
  1         1 <ensemble [3]> ENSEMBLE (GLMNET STACK): 3 MODELS NA         
  -- ERROR (test-ensemble_model_spec.R:145:5): ensemble_model_spec(): GLMNET (Tuni
  Error: All models failed Modeltime Calibration.
  Backtrace:
       x
    1. \-ensemble_fit_glmnet %>% modeltime_calibrate(testing(m750_splits)) test-ensemble_model_spec.R:145:4
    2.   +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
    3.   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    4.     \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    5.       \-modeltime.ensemble:::`_fseq`(`_lhs`)
    6.         \-magrittr::freduce(value, `_function_list`)
    7.           +-base::withVisible(function_list[[k]](value))
    8.           \-function_list[[k]](value)
    9.             +-modeltime::modeltime_calibrate(., testing(m750_splits))
   10.             \-modeltime.ensemble:::modeltime_calibrate.mdl_time_ensemble(...)
   11.               \-`%>%`(...)
   12.                 +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
   13.                 \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   14.                   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   15.                     \-modeltime.ensemble:::`_fseq`(`_lhs`)
   16.                       \-magrittr::freduce(value, `_function_list`)
   17.                         +-base::withVisible(function_list[[k]](value))
   18.                         \-function_list[[k]](value)
   19.                           +-modeltime::modeltime_calibrate(...)
   20.                           \-modeltime:::modeltime_calibrate.mdl_time_tbl(...)
   21.                             \-modeltime:::validate_modeltime_calibration(ret)
  
  -- Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking ------------
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking ------------
  Unknown or uninitialised column: `.key`.
  
  -- Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking ------------
  Problem with `mutate()` input `.nested.col`.
  i Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking ------------
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking ------------
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking ------------
  Unknown or uninitialised column: `.key`.
  
  # A tibble: 4 x 4
    .model_id .model         .model_desc                   .nested.col
        <int> <list>         <chr>                         <lgl>      
  1         1 <ensemble [4]> ENSEMBLE (WEIGHTED): 4 MODELS NA         
  2         2 <workflow>     ARIMA(0,1,1)(0,1,1)[12]       NA         
  3         3 <workflow>     PROPHET                       NA         
  4         4 <workflow>     GLMNET                        NA         
  -- ERROR (test-ensemble_model_spec.R:194:5): Multi-Level Stacking --------------
  Error: All models failed Modeltime Calibration.
  Backtrace:
       x
    1. \-multi_level_model_tbl %>% modeltime_accuracy(testing(m750_splits)) test-ensemble_model_spec.R:194:4
    2.   +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
    3.   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    4.     \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    5.       \-modeltime.ensemble:::`_fseq`(`_lhs`)
    6.         \-magrittr::freduce(value, `_function_list`)
    7.           +-base::withVisible(function_list[[k]](value))
    8.           \-function_list[[k]](value)
    9.             +-modeltime::modeltime_accuracy(., testing(m750_splits))
   10.             \-modeltime:::modeltime_accuracy.mdl_time_tbl(., testing(m750_splits))
   11.               \-data %>% modeltime_calibrate(new_data = new_data)
   12.                 +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
   13.                 \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   14.                   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   15.                     \-modeltime:::`_fseq`(`_lhs`)
   16.                       \-magrittr::freduce(value, `_function_list`)
   17.                         +-base::withVisible(function_list[[k]](value))
   18.                         \-function_list[[k]](value)
   19.                           +-modeltime::modeltime_calibrate(., new_data = new_data)
   20.                           \-modeltime:::modeltime_calibrate.mdl_time_tbl(., new_data = new_data)
   21.                             \-modeltime:::validate_modeltime_calibration(ret)
  
  -- Modeltime Ensemble -------------------------------------------
  Ensemble of 3 Models (WEIGHTED)
  
  # Modeltime Table
  # A tibble: 3 x 4
    .model_id .model     .model_desc             .loadings
        <int> <list>     <chr>                       <dbl>
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]     0.5  
  2         2 <workflow> PROPHET                     0.333
  3         3 <workflow> GLMNET                      0.167
  -- Warning (test-ensemble_weighted.R:36:5): ensemble_weighted() ----------------
  Problem with `mutate()` input `.nested.col`.
  i Unknown or uninitialised column: `.key`.
  i Input `.nested.col` is `purrr::map2(...)`.
  
  -- Warning (test-ensemble_weighted.R:36:5): ensemble_weighted() ----------------
  Unknown or uninitialised column: `.key`.
  
  -- Warning (test-ensemble_weighted.R:36:5): ensemble_weighted() ----------------
  Unknown or uninitialised column: `.key`.
  
  -- ERROR (test-ensemble_weighted.R:36:5): ensemble_weighted() ------------------
  Error: Problem with `filter()` input `..1`.
  x object '.key' not found
  i Input `..1` is `.model_desc == "ACTUAL" | .key == "prediction"`.
  Backtrace:
       x
    1. +-modeltime_table(ensemble_fit_wt) %>% modeltime_forecast(testing(m750_splits)) test-ensemble_weighted.R:36:4
    2. | +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
    3. | \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    4. |   \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
    5. |     \-modeltime.ensemble:::`_fseq`(`_lhs`)
    6. |       \-magrittr::freduce(value, `_function_list`)
    7. |         +-base::withVisible(function_list[[k]](value))
    8. |         \-function_list[[k]](value)
    9. |           +-modeltime::modeltime_forecast(., testing(m750_splits))
   10. |           \-modeltime:::modeltime_forecast.mdl_time_tbl(., testing(m750_splits))
   11. |             \-ret %>% dplyr::filter(.model_desc == "ACTUAL" | .key == "prediction")
   12. |               +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
   13. |               \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   14. |                 \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
   15. |                   \-modeltime:::`_fseq`(`_lhs`)
   16. |                     \-magrittr::freduce(value, `_function_list`)
   17. |                       +-base::withVisible(function_list[[k]](value))
   18. |                       \-function_list[[k]](value)
   19. |                         +-dplyr::filter(., .model_desc == "ACTUAL" | .key == "prediction")
   20. |                         \-dplyr:::filter.data.frame(...)
   21. |                           \-dplyr:::filter_rows(.data, ...)
   22. |                             +-base::withCallingHandlers(...)
   23. |                             \-mask$eval_all_filter(dots, env_filter)
   24. \-base::.handleSimpleError(...)
   25.   \-dplyr:::h(simpleError(msg, call))
  
  == testthat results  ===========================================================
  Warning (test-ensemble_average.R:43:5): ensemble_average(type = 'median')
  Warning (test-ensemble_average.R:43:5): ensemble_average(type = 'median')
  ERROR (test-ensemble_average.R:43:5): ensemble_average(type = 'median')
  Warning (test-ensemble_average.R:106:5): ensemble_average(type = 'mean')
  Warning (test-ensemble_average.R:106:5): ensemble_average(type = 'mean')
  Warning (test-ensemble_average.R:106:5): ensemble_average(type = 'mean')
  ERROR (test-ensemble_average.R:106:5): ensemble_average(type = 'mean')
  Warning (test-ensemble_model_spec.R:53:5): ensemble_model_spec(): Linear Regression (No Tuning)
  Warning (test-ensemble_model_spec.R:53:5): ensemble_model_spec(): Linear Regression (No Tuning)
  ERROR (test-ensemble_model_spec.R:53:5): ensemble_model_spec(): Linear Regression (No Tuning)
  Warning (test-ensemble_model_spec.R:145:5): ensemble_model_spec(): GLMNET (Tuning)
  Warning (test-ensemble_model_spec.R:145:5): ensemble_model_spec(): GLMNET (Tuning)
  ERROR (test-ensemble_model_spec.R:145:5): ensemble_model_spec(): GLMNET (Tuning)
  Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking
  Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking
  Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking
  Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking
  Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking
  Warning (test-ensemble_model_spec.R:194:5): Multi-Level Stacking
  ERROR (test-ensemble_model_spec.R:194:5): Multi-Level Stacking
  Warning (test-ensemble_weighted.R:36:5): ensemble_weighted()
  Warning (test-ensemble_weighted.R:36:5): ensemble_weighted()
  Warning (test-ensemble_weighted.R:36:5): ensemble_weighted()
  ERROR (test-ensemble_weighted.R:36:5): ensemble_weighted()
  
  [ FAIL 6 | WARN 18 | SKIP 0 | PASS 90 ]
  Error: Test failures
  Execution halted