"E2E: Functional spec (regression) works"
"E2E: Functional regression works with named predictors in formula"
"E2E: Block repetition works for functional models"
"E2E: Multi-input, multi-output functional regression works"

Expected `fit_obj <- fit(spec, mpg ~ cyl + disp, data = data)` to run without any errors.
i Actually got a <simpleError> with text:
  ModuleNotFoundError: No module named 'keras'
  Run `reticulate::py_last_error()` for details.

E2E: Functional regression works with named predictors in formula

E2E: Block repetition works for functional models

E2E: Multi-input, multi-output functional regression works

test_that("E2E: Multi-block model tuning works", {
input_block_mb <- function(model, input_shape) {
starting_layers <- function(model, layer1_units = 16, layer2_units = 32) {
keras3::layer_dense(units = layer1_units, activation = "relu") |>
keras3::layer_dense(units = layer2_units, activation = "relu")
ending_layers <- function(model, units = 32, dropout = 0.2) {
keras3::layer_dense(units = units, activation = "relu") |>
output_block_mb <- function(model, num_classes) {
model |> keras3::layer_dense(units = num_classes, activation = "softmax")
# Use a try block because tuning can sometimes fail for non-package reasons
c("num_start", "start_layer1_units", "start_layer2_units", "end_units") %in%

Expected `fit_multi <- fit(wf_multi, data = multi_data)` to run without any errors.
i Actually got a <simpleError> with text:
  ModuleNotFoundError: No module named 'keras'
  Run `reticulate::py_last_error()` for details.

test_that("E2E: Classification spec generation, fitting, and prediction works", {
input_block_class <- function(model, input_shape) {
dense_block_class <- function(model, units = 16) {
keras3::layer_dense(units = units, activation = "relu")
output_block_class <- function(model, num_classes) {
rec_multi <- recipe(Species ~ ., data = multi_data)
expect_no_error(fit_multi <- fit(wf_multi, data = multi_data))
expect_true(all(abs(rowSums(preds_prob_multi) - 1) < 1e-5))
rec_bin <- recipe(Class ~ ., data = binary_data)
expect_no_error(fit_bin <- fit(wf_bin, data = binary_data))
expect_true(all(abs(rowSums(preds_prob_bin) - 1) < 1e-5))