-
Notifications
You must be signed in to change notification settings - Fork 10
Steps can potentially clobber epi_df
#175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am still very vague on R's classes and object attributes, so this is a very basic question: when a function like |
In most of R stuff, it's supposed to be [something like] shallow-copy-on-write[-unless-it-does-not-seem-necessary]. The way it's doing it right now is basically creating a new "object" (SEXP) with pointers to new attributes (including the new class setting, and copying(/aliasing) some of the old attributes), and pointing to the same set of columns. If the But whether or not we have the old metadata, it doesn't look like we can make |
To try to more answer @dshemetov's question: if |
The issue here is really a confluence of factors. So TL;DR, there's the proposed fix at the bottom. The rest of this is a description of some R functionality as well as a bit about how guts of recipes/prepping/baking interact.
I think that the correct fix (at least for now) is to modify This issue is one of many similar that I've run into. The logic of the things this other group does is frequently undocumented. So I can't make mine match until it breaks. |
@dshemetov @brookslogan I'm working on a fix for this, but I wanted to see what you think. When a recipe is prepped/baked, it loops through all the steps. These steps must output a Some things to note: validating against metadata is potentially tricky. The metadata is not necessarily enforced. So the data could be daily, but have a
I'm sort of leaning toward 3. I have a bit of a preference for "unexpected behaviour to be documented rather than printed on the console". What do you guys think? |
Side note: I also hit on some of this |
recipes::step_naomit()
converts to tibble. This is not generally a problem unless you do this before you do something that tries to read theepi_df
metadata (e.g.step_training_window()
).This is potentially a major pain: any step that clobbers our
epi_df
could do this.Find a way to log the epi_df more explicitly elsewhere in a way that’s accessible, but not removable.
Created on 2023-04-26 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: