Closed dajmcdon closed 1 month ago
I was running into this in adjustAhead with step_mutate
; I think most non-epipredict steps will do this.
My solution for this was to put the metadata in at prep time, but that isn't exactly ideal, as there may be different metadata at later points
This is potentially impossible to fix. Any call to bake()
will destroy the epi_df
at the end of the loop (unless we clobber recipes:::bake.recipe()
.
Reason:
bake(epi_recipe)
-> recipes:::bake.recipe()
-> ... -> hardhat::recompose(new_data,...)
-> hardhat::coerce_to_tibble()
-> hardhat::hardhat_new_tibble()
This last drops the class without recourse. I don't suspect they will be willing to change this behaviour: tidymodels/hardhat#230.
step_epi_naomit()
is one such.step_naomit()
callstibble::as_tibble()
at the end.Consider reconstructing the
epi_df
after each step inside thebake/prep
loop.