-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
No constants #1730
No constants #1730
Conversation
What's the key noticeable difference that one would see when this is merged? Am I thinking about it right in that we won't see all the |
@joshmeek yup that's one major difference; another is that with Flow("blah") as flow:
add(2, 4) will result in a Flow with a single task. This will be very apparent in flow.visualize() and in the UI views. |
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.
Looks good from my standpoint
Co-Authored-By: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
Admin: Bumping orion-design version
Thanks for contributing to Prefect!
Please describe your work and make sure your PR:
CHANGELOG.md
(if appropriate)docs/outline.toml
for API reference docs (if appropriate)Note that your PR will not be reviewed unless all three boxes are checked.
What does this PR change?
This PR completely avoids the auto-generation and execution of Python constants which are upstream of a given task. Instead, these constants are tracked on the Flow object directly, and artificial edges are created at runtime to manage them as upstream dependencies.
Why is this PR important?
The autogeneration of constants is perhaps one of the more confusing aspects of Prefect's functional API for newcomers. In addition, Cloud users do not find
Constant[str]
type tasks to be useful or informative, and ultimately these just eat up real estate on all screens. The current PR completely avoids this situation unless a user explicitly opts into it via wrapping their objects inprefect.tasks.core.constants.Constant()
Labeled as WIP as I still need to:
add more testsupdate documentationhandle Cloud retries / failuresbut I wanted some initial feedback on the implementation here.