-
Notifications
You must be signed in to change notification settings - Fork 86
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
Post-function modification (opposite/equivalent to pipe
)
#701
Comments
I think there's a place for this along with Although, I propose to rename it Although these decorators are not much different than writing additional nodes, I think they can greatly facilitate migration by allowing to plug in an existing codebase into new/smaller Hamilton initiatives |
Feels like |
I like your @pipe documentation and the fact that is echoes the pandas To me, "pipe" better communicates than "modify" the idea that you can stack many sequential transforms |
From @skrawcz on #749 (duplicate): Is your feature request related to a problem? Please describe. Describe the solution you'd like @post_pipe(# these run after the function is run.
step(_transform_1, v=1),
step(_transform_2, v=2),
)
def A_processed(A: pd.DataFrame) -> pd.DataFrame:
return A # original A -- could do modifications here. Describe alternatives you've considered Additional context |
Is your feature request related to a problem? Please describe.
People often want data quality checks to modify the output, but that's really not what they're supposed to do.
@pipe
applies a function, but it is run beforehand. So if you just want to change the output of a node, you have to do it in two steps.Describe the solution you'd like
New decorator that functions like
pipe
, but runs afterwards:This would form the DAG:
data.raw -> data.with_drop_between -> data
Describe alternatives you've considered
Making it more central to data quality or just integating with the node.
Additional context
Related to an OS question.
The text was updated successfully, but these errors were encountered: