-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Automatically convert non-flows into flows #17024
Conversation
CodSpeed Performance ReportMerging #17024 will not alter performanceComparing Summary
|
My initial reaction is that this is cool and should be its own utility. That way we can keep the behavior of the current utility consistent and sidestep any edge cases that might arise if we get a |
That sounds good to me! I made a tweak here (still need to fix tests). Is this what you had in mind? Or is there a different way/different place you'd recommend? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool!
This PR updates
load_flow_from_entrypoint
to automatically wrap any Python function in aFlow
object if it is not already, removing the requirement that a user explicitly decorate their function with@flow
if they want to deploy it. By doing so, we lower the barrier for using Prefect to remotely deploy and run code—allowing quick adoption without forcing users to modify existing codebases as existing scripts become immediately deployable/schedulable.As far I can tell there is no technical reason why we can't do this and I think it is a very big value add. I would be happy only include this functionality behind an experimental flag if that is preferred.