stacked model error in tidymodels

Hi,

I have build one stacked model for multinomial classification using tidmodels with following code. However, one errow was arised. Is anyone can help me? It's seen that came from the LDA model.

Best,
Pinjun

Error:
Problem with mutate() column idx.
i idx = which.max(dplyr::c_across(dplyr::starts_with(".pred_"))).
i idx must be size 1, not 0.
i Did you mean: idx = list(which.max(dplyr::c_across(dplyr::starts_with(".pred_")))) ?
i The error occurred in row 3.
Caused by error in abort_glue():

registerDoParallel(4)

recipe_origin <- iris_training %>%
recipe(Score ~ . ) %>%
step_rm(Variety, BPH, Days, Position, Resolution, Cover, Pot, Replicate)

k_cv <- vfold_cv(iris_training, v = 5, repeats = 5)

ctrl_grid <- control_grid(extract = identity, save_pred = TRUE,
parallel_over = "everything",
save_workflow = TRUE)

svm_model <-
svm_rbf(
cost = tune(),
rbf_sigma = tune()
) %>%
set_mode("classification") %>%
set_engine("kernlab") %>%

lmda_reg_model <-
discrim_linear(penalty = tune()) %>% #?discrim_flexible, discrim_regularized
set_engine("mda") %>%
set_mode("classification") %>%

chi_models <-
workflow_set(
preproc = list(simple = iris_recipe_origin),
models = listsvm_model = svm_model, lmda = lmda_reg_model),
cross = TRUE
)

chi_models_res <-
chi_models %>%
workflow_map("tune_grid", resamples = k_cv,
metrics = metric_set(roc_auc, accuracy), verbose = TRUE, seed = 123,
control = ctrl_grid)

grid_ens <- stacks() %>%

#Determine stacking coefficients
grid_fit <- blend_predictions(grid_ens)

#Fit model tack members with non-zero stacking coefficients
grid_members <- fit_members(grid_fit)

stack_res <- iris_testing %>% bind_cols(predict(grid_members, ., type = "prob"))

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7600)

Matrix products: default

locale:
 LC_COLLATE=Chinese (Simplified)_China.936
 LC_CTYPE=Chinese (Simplified)_China.936
 LC_MONETARY=Chinese (Simplified)_China.936
 LC_NUMERIC=C
 LC_TIME=Chinese (Simplified)_China.936

attached base packages:
 parallel stats graphics grDevices utils datasets
 methods base

other attached packages:
 prospectr_0.2.1 keras_2.7.0.9000
 doParallel_1.0.16 iterators_1.0.13
 multilevelmod_0.0.0.9000 naivebayes_0.9.7
 discrim_0.1.2 stacks_0.2.0
 plsmod_0.1.1 themis_0.1.4.9000
 recipeselectors_0.0.1 pacman_0.5.1
 yardstick_0.0.8.9000 workflowsets_0.1.0.9000
 workflows_0.2.4 tune_0.1.6
 rsample_0.1.0 recipes_0.1.17
 parsnip_0.1.7 modeldata_0.1.1
 infer_1.0.0 dials_0.0.10
 scales_1.1.1.9000 broom_0.7.9
 tidymodels_0.1.4.9000 forcats_0.5.1
 stringr_1.4.0 dplyr_1.0.7
{"ft_lang_label":"__label__en","ft_lang_prob":0.61259943,"math_prob":0.94659287,"size":2837,"snap":"2022-05-2022-21","text_gpt3_token_len":1013,"char_repetition_ratio":0.08506883,"word_repetition_ratio":0.0,"special_character_ratio":0.3697568,"punctuation_ratio":0.2757353,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97323483,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-01-24T10:20:53Z\",\"WARC-Record-ID\":\"<urn:uuid:6b7d955c-bc3b-4d9c-a084-045ae710f2bf>\",\"Content-Length\":\"17937\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5184d4c9-7e63-43f5-8bdc-9946483b6b4e>\",\"WARC-Concurrent-To\":\"<urn:uuid:b7a57c72-6d8d-47db-8dd8-d4f71394a235>\",\"WARC-IP-Address\":\"167.99.20.217\",\"WARC-Target-URI\":\"https://community.rstudio.com/t/stacked-model-error-in-tidymodels/122766\",\"WARC-Payload-Digest\":\"sha1:EYDUPVE5J37AHAXAWUVOMTEAYXFP3GQF\",\"WARC-Block-Digest\":\"sha1:X5JRM7DOK5RRUFJ67CU5NYG7XHUE7NYL\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-05/CC-MAIN-2022-05_segments_1642320304528.78_warc_CC-MAIN-20220124094120-20220124124120-00716.warc.gz\"}"}