tidymodels / extratests

Integration and other testing for tidymodels
Other
20 stars 1 forks source link

address GH check failures #221

Closed simonpcouch closed 1 month ago

simonpcouch commented 1 month ago

Currently, on Ubuntu we're seeing:

── 1. Error ('test-survival-workflows.R:77:1'): can `fit()` a censored workflow 
<CStackOverflowError/stackOverflowError/error/condition>
Error: Error: C stack usage  15938740 is too close to the limit

── 2. Error ('test-survival-workflows.R:205:1'): can `predict()` a censored work
<CStackOverflowError/stackOverflowError/error/condition>
Error: Error: C stack usage  15938740 is too close to the limit

and on Windows:

══ Failed ══════════════════════════════════════════════════════════════════════
Error: Error in as_function(.f, env = global_env()) : node stack overflow
Calls: test_check ... .rlang_purrr_map_mold -> as_function -> is_function
Execution halted

I can replicate the C stack usage error locally and namespacing the dataset (which is likely good test hygiene anyway) seems to resolve it. The error comes from tidyr::drop_na() after having ran the drop_na() %>% mutate(...) code once. I would guess that this first commit resolves the Ubuntu error but I don't have much intuition on the Windows one yet.

.rlang_purrr_map_mold is part of the import-purrr-standalone. Neither of workflows or censored have GH changes in the past 3 days, and none of testthat, dplyr, tidyr, or survival have recently released CRAN versions.

simonpcouch commented 1 month ago

recipes recently transitioned to vec_detect_complete() under the hood, which is also under the hood in drop_na(). Maybe recipes is calling that somewhere later in the test and triggering that error?

simonpcouch commented 1 month ago

Handing off to @EmilHvitfeldt!

EmilHvitfeldt commented 1 month ago

turned out this was a issue in {recipes}, since we switched from complete.cases() to vec_detect_complete(), it broke since vec_detect_complete() doesn't like Surv objects.

https://github.com/tidymodels/recipes/pull/1373