R Under development (unstable) (2025-08-21 r88668 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # 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(kerasnip) > > test_check("kerasnip") Loading required package: dplyr Attaching package: 'dplyr' The following object is masked from 'package:testthat': matches The following objects are masked from 'package:stats': filter, lag The following objects are masked from 'package:base': intersect, setdiff, setequal, union Attaching package: 'recipes' The following object is masked from 'package:stats': step Attaching package: 'modeldata' The following object is masked from 'package:datasets': penguins Attaching package: 'rsample' The following object is masked from 'package:testthat': matches Loading required package: scales Attaching package: 'purrr' The following object is masked from 'package:scales': discard The following object is masked from 'package:testthat': is_null x Fold1: preprocessor 1/1, model 1/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 2/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 3/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 4/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 1/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 2/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 3/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 4/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 1/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 2/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 3/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 4/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 5/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 6/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 7/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 8/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 9/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 10/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 11/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 12/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 13/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 14/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 15/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 16/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 1/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 2/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 3/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 4/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 5/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 6/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 7/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 8/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 9/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 10/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 11/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 12/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 13/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 14/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 15/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 16/16: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Removed from parsnip registry objects: removable_model, removable_model_args, removable_model_encoding, removable_model_fit, removable_model_modes, removable_model_pkgs, removable_model_predict Removed 'removable_model' from parsnip:::get_model_env()$models x Fold1: preprocessor 1/1, model 1/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 2/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 3/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold1: preprocessor 1/1, model 4/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 1/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 2/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 3/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. x Fold2: preprocessor 1/1, model 4/4: Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. [ FAIL 29 | WARN 3 | SKIP 5 | PASS 37 ] ══ Skipped tests (5) ═══════════════════════════════════════════════════════════ • On CRAN (5): 'test_compile_keras_grid.R:8:3', 'test_compile_keras_grid.R:67:3', 'test_compile_keras_grid.R:141:3', 'test_step_collapse.R:63:3', 'test_step_collapse.R:74:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_e2e_features.R:5:5'): E2E: Customizing main arguments works ──── Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Backtrace: ▆ 1. ├─testthat::expect_no_warning(...) at test_e2e_features.R:39:3 2. │ └─testthat:::expect_no_(...) 3. │ └─testthat:::quasi_capture(enquo(object), NULL, capture) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─rlang::try_fetch(...) 6. │ │ └─base::withCallingHandlers(...) 7. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 8. ├─parsnip::fit(spec, mpg ~ ., data = mtcars) 9. ├─parsnip::fit.model_spec(spec, mpg ~ ., data = mtcars) 10. │ └─parsnip:::form_form(object = object, control = control, env = eval_env) 11. │ └─parsnip:::eval_mod(...) 12. │ └─rlang::eval_tidy(e, env = envir, ...) 13. ├─kerasnip::generic_sequential_fit(...) 14. │ └─kerasnip:::build_and_compile_sequential_model(...) 15. │ ├─rlang::exec(block_fn, !!!call_args) 16. │ └─kerasnip (local) ``(NULL, input_shape = 10L) 17. │ └─keras3::keras_model_sequential(input_shape = input_shape) at test_e2e_features.R:5:5 18. │ ├─base::do.call(InputLayer, InputLayer_args) 19. │ └─keras3 (local) ``(input_shape = 10L) 20. │ ├─base::do.call(keras$layers$InputLayer, args) 21. │ ├─keras$layers 22. │ └─reticulate:::`$.python.builtin.module`(keras, "layers") 23. │ └─reticulate::py_get_attr(x, name, TRUE) 24. └─reticulate (local) ``(``) 25. └─keras3 (local) on_error(result) ── Failure ('test_e2e_features.R:99:3'): E2E: Customizing fit arguments works ── Expected `fit_obj <- parsnip::fit(spec, mpg ~ ., data = mtcars)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_features.R:109:5'): E2E: Setting num_blocks = 0 works for sequential models ── Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Backtrace: ▆ 1. ├─parsnip::fit(spec, mpg ~ ., data = mtcars) at test_e2e_features.R:139:3 2. ├─parsnip::fit.model_spec(spec, mpg ~ ., data = mtcars) 3. │ └─parsnip:::form_form(object = object, control = control, env = eval_env) 4. │ └─parsnip:::eval_mod(...) 5. │ └─rlang::eval_tidy(e, env = envir, ...) 6. ├─kerasnip::generic_sequential_fit(...) 7. │ └─kerasnip:::build_and_compile_sequential_model(...) 8. │ ├─rlang::exec(block_fn, !!!call_args) 9. │ └─kerasnip (local) ``(NULL, input_shape = 10L) 10. │ └─keras3::keras_model_sequential(input_shape = input_shape) at test_e2e_features.R:109:5 11. │ ├─base::do.call(InputLayer, InputLayer_args) 12. │ └─keras3 (local) ``(input_shape = 10L) 13. │ ├─base::do.call(keras$layers$InputLayer, args) 14. │ ├─keras$layers 15. │ └─reticulate:::`$.python.builtin.module`(keras, "layers") 16. │ └─reticulate::py_get_attr(x, name, TRUE) 17. └─reticulate (local) ``(``) 18. └─keras3 (local) on_error(result) ── Error ('test_e2e_features.R:170:5'): E2E: extract_keras_model works ───────── Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Backtrace: ▆ 1. ├─parsnip::fit(spec, mpg ~ ., data = mtcars) at test_e2e_features.R:195:3 2. ├─parsnip::fit.model_spec(spec, mpg ~ ., data = mtcars) 3. │ └─parsnip:::form_form(object = object, control = control, env = eval_env) 4. │ └─parsnip:::eval_mod(...) 5. │ └─rlang::eval_tidy(e, env = envir, ...) 6. ├─kerasnip::generic_sequential_fit(...) 7. │ └─kerasnip:::build_and_compile_sequential_model(...) 8. │ ├─rlang::exec(block_fn, !!!call_args) 9. │ └─kerasnip (local) ``(NULL, input_shape = 10L) 10. │ └─keras3::keras_model_sequential(input_shape = input_shape) at test_e2e_features.R:170:5 11. │ ├─base::do.call(InputLayer, InputLayer_args) 12. │ └─keras3 (local) ``(input_shape = 10L) 13. │ ├─base::do.call(keras$layers$InputLayer, args) 14. │ ├─keras$layers 15. │ └─reticulate:::`$.python.builtin.module`(keras, "layers") 16. │ └─reticulate::py_get_attr(x, name, TRUE) 17. └─reticulate (local) ``(``) 18. └─keras3 (local) on_error(result) ── Error ('test_e2e_features.R:210:5'): E2E: extract_keras_history works ─────── Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Backtrace: ▆ 1. ├─parsnip::fit(spec, mpg ~ ., data = mtcars) at test_e2e_features.R:236:3 2. ├─parsnip::fit.model_spec(spec, mpg ~ ., data = mtcars) 3. │ └─parsnip:::form_form(object = object, control = control, env = eval_env) 4. │ └─parsnip:::eval_mod(...) 5. │ └─rlang::eval_tidy(e, env = envir, ...) 6. ├─kerasnip::generic_sequential_fit(...) 7. │ └─kerasnip:::build_and_compile_sequential_model(...) 8. │ ├─rlang::exec(block_fn, !!!call_args) 9. │ └─kerasnip (local) ``(NULL, input_shape = 10L) 10. │ └─keras3::keras_model_sequential(input_shape = input_shape) at test_e2e_features.R:210:5 11. │ ├─base::do.call(InputLayer, InputLayer_args) 12. │ └─keras3 (local) ``(input_shape = 10L) 13. │ ├─base::do.call(keras$layers$InputLayer, args) 14. │ ├─keras$layers 15. │ └─reticulate:::`$.python.builtin.module`(keras, "layers") 16. │ └─reticulate::py_get_attr(x, name, TRUE) 17. └─reticulate (local) ``(``) 18. └─keras3 (local) on_error(result) ── Error ('test_e2e_features.R:248:5'): E2E: keras_evaluate works ────────────── Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Backtrace: ▆ 1. ├─parsnip::fit(spec, mpg ~ ., data = mtcars) at test_e2e_features.R:273:3 2. ├─parsnip::fit.model_spec(spec, mpg ~ ., data = mtcars) 3. │ └─parsnip:::form_form(object = object, control = control, env = eval_env) 4. │ └─parsnip:::eval_mod(...) 5. │ └─rlang::eval_tidy(e, env = envir, ...) 6. ├─kerasnip::generic_sequential_fit(...) 7. │ └─kerasnip:::build_and_compile_sequential_model(...) 8. │ ├─rlang::exec(block_fn, !!!call_args) 9. │ └─kerasnip (local) ``(NULL, input_shape = 10L) 10. │ └─keras3::keras_model_sequential(input_shape = input_shape) at test_e2e_features.R:248:5 11. │ ├─base::do.call(InputLayer, InputLayer_args) 12. │ └─keras3 (local) ``(input_shape = 10L) 13. │ ├─base::do.call(keras$layers$InputLayer, args) 14. │ ├─keras$layers 15. │ └─reticulate:::`$.python.builtin.module`(keras, "layers") 16. │ └─reticulate::py_get_attr(x, name, TRUE) 17. └─reticulate (local) ``(``) 18. └─keras3 (local) on_error(result) ── Failure ('test_e2e_func_classification.R:49:3'): E2E: Functional spec (classification) works ── Expected `fit_obj <- parsnip::fit(wf, data = data)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_func_classification.R:50:3'): E2E: Functional spec (classification) works ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─testthat::expect_s3_class(fit_obj, "workflow") at test_e2e_func_classification.R:50:3 2. └─testthat::quasi_label(enquo(object), arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Error ('test_e2e_func_classification.R:126:3'): E2E: Functional spec tuning (including repetition) works ── Error in `estimate_tune_results(x)`: All models failed. Run `show_notes(.Last.tune.result)` for more information. Backtrace: ▆ 1. ├─tune::collect_metrics(tune_res) at test_e2e_func_classification.R:126:3 2. └─tune:::collect_metrics.tune_results(tune_res) 3. └─tune::estimate_tune_results(x) 4. └─rlang::abort("All models failed. Run `show_notes(.Last.tune.result)` for more information.") ── Failure ('test_e2e_func_classification.R:183:3'): E2E: Multi-input, single-output functional classification works ── Expected `fit_obj <- parsnip::fit(wf, data = train_df)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_func_classification.R:189:3'): E2E: Multi-input, single-output functional classification works ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─stats::predict(fit_obj, new_data = new_data_df) at test_e2e_func_classification.R:189:3 ── Error ('test_e2e_func_classification.R:232:3'): E2E: Functional spec with pre-constructed optimizer works ── Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Backtrace: ▆ 1. ├─keras3::optimizer_sgd(learning_rate = 0.001) at test_e2e_func_classification.R:232:3 2. │ ├─base::do.call(keras$optimizers$SGD, args) 3. │ ├─keras$optimizers 4. │ └─reticulate:::`$.python.builtin.module`(keras, "optimizers") 5. │ └─reticulate::py_get_attr(x, name, TRUE) 6. └─reticulate (local) ``(``) 7. └─keras3 (local) on_error(result) ── Failure ('test_e2e_func_classification.R:296:3'): E2E: Functional spec with string loss works ── Expected `fit_obj <- parsnip::fit(wf, data = data)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_func_classification.R:297:3'): E2E: Functional spec with string loss works ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─testthat::expect_s3_class(fit_obj, "workflow") at test_e2e_func_classification.R:297:3 2. └─testthat::quasi_label(enquo(object), arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Failure ('test_e2e_func_regression.R:5:18'): E2E: Functional spec (regression) works ── Expected `fit_obj <- parsnip::fit(wf, data = data)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_func_regression.R:45:3'): E2E: Functional spec (regression) works ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─testthat::expect_s3_class(fit_obj, "workflow") at test_e2e_func_regression.R:45:3 2. └─testthat::quasi_label(enquo(object), arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Failure ('test_e2e_func_regression.R:57:18'): E2E: Functional regression works with named predictors in formula ── Expected `fit_obj <- fit(spec, mpg ~ cyl + disp, data = data)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_func_regression.R:94:3'): E2E: Functional regression works with named predictors in formula ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─testthat::expect_s3_class(fit_obj, "model_fit") at test_e2e_func_regression.R:94:3 2. └─testthat::quasi_label(enquo(object), arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Error ('test_e2e_func_regression.R:100:18'): E2E: Block repetition works for functional models ── Error: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. Backtrace: ▆ 1. ├─generics::fit(spec_1, mpg ~ ., data = mtcars) at test_e2e_func_regression.R:122:3 2. ├─parsnip::fit.model_spec(spec_1, mpg ~ ., data = mtcars) 3. │ └─parsnip:::form_form(object = object, control = control, env = eval_env) 4. │ └─parsnip:::eval_mod(...) 5. │ └─rlang::eval_tidy(e, env = envir, ...) 6. ├─kerasnip::generic_functional_fit(...) 7. │ └─kerasnip:::build_and_compile_functional_model(...) 8. │ └─kerasnip (local) first_block_fn(input_shape = input_shape) 9. │ └─keras3::layer_input(shape = input_shape) at test_e2e_func_regression.R:100:18 10. │ ├─base::do.call(keras$Input, args) 11. │ ├─keras$Input 12. │ └─reticulate:::`$.python.builtin.module`(keras, "Input") 13. │ └─reticulate::py_get_attr(x, name, TRUE) 14. └─reticulate (local) ``(``) 15. └─keras3 (local) on_error(result) ── Failure ('test_e2e_func_regression.R:158:5'): E2E: Multi-input, multi-output functional regression works ── Expected `fit_obj <- parsnip::fit(wf, data = train_df)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_func_regression.R:219:3'): E2E: Multi-input, multi-output functional regression works ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─stats::predict(fit_obj, new_data = new_data_df) at test_e2e_func_regression.R:219:3 ── Error ('test_e2e_multiblock_tuning.R:85:3'): E2E: Multi-block model tuning works ── Error in `estimate_tune_results(x)`: All models failed. Run `show_notes(.Last.tune.result)` for more information. Backtrace: ▆ 1. ├─tune::collect_metrics(tune_res) at test_e2e_multiblock_tuning.R:85:3 2. └─tune:::collect_metrics.tune_results(tune_res) 3. └─tune::estimate_tune_results(x) 4. └─rlang::abort("All models failed. Run `show_notes(.Last.tune.result)` for more information.") ── Failure ('test_e2e_seq_classification.R:40:3'): E2E: Classification spec generation, fitting, and prediction works ── Expected `fit_multi <- fit(wf_multi, data = multi_data)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_seq_classification.R:41:3'): E2E: Classification spec generation, fitting, and prediction works ── Error in `eval(code, test_env)`: object 'fit_multi' not found Backtrace: ▆ 1. └─testthat::expect_s3_class(fit_multi, "workflow") at test_e2e_seq_classification.R:41:3 2. └─testthat::quasi_label(enquo(object), arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Failure ('test_e2e_seq_regression.R:5:5'): E2E: Regression spec generation, fitting, and prediction works ── Expected `fit_obj <- fit(wf, data = data)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_seq_regression.R:44:3'): E2E: Regression spec generation, fitting, and prediction works ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─testthat::expect_s3_class(fit_obj, "workflow") at test_e2e_seq_regression.R:44:3 2. └─testthat::quasi_label(enquo(object), arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Failure ('test_e2e_seq_regression.R:57:5'): E2E: Sequential regression works with named predictors in formula ── Expected `fit_obj <- fit(spec, mpg ~ cyl + disp, data = data)` to run without any errors. i Actually got a with text: ModuleNotFoundError: No module named 'keras' Run `reticulate::py_last_error()` for details. ── Error ('test_e2e_seq_regression.R:91:3'): E2E: Sequential regression works with named predictors in formula ── Error in `eval(code, test_env)`: object 'fit_obj' not found Backtrace: ▆ 1. └─testthat::expect_s3_class(fit_obj, "model_fit") at test_e2e_seq_regression.R:91:3 2. └─testthat::quasi_label(enquo(object), arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Error ('test_e2e_tuning.R:64:3'): E2E: Tuning works with a generated spec ─── Error in `estimate_tune_results(x)`: All models failed. Run `show_notes(.Last.tune.result)` for more information. Backtrace: ▆ 1. ├─tune::collect_metrics(tune_res) at test_e2e_tuning.R:64:3 2. └─tune:::collect_metrics.tune_results(tune_res) 3. └─tune::estimate_tune_results(x) 4. └─rlang::abort("All models failed. Run `show_notes(.Last.tune.result)` for more information.") [ FAIL 29 | WARN 3 | SKIP 5 | PASS 37 ] Error: Test failures Execution halted