-
Notifications
You must be signed in to change notification settings - Fork 903
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
Add deployment guide for Prefect 2.0 #2431
Comments
Related: do we want to keep the existing Prefect 1.0 guide? I'm not familiar with the project enough to judge. |
I'm not familiar enough, either, but I assume most new deployments should be to Prefect 2.0 (so I'd say it's not as important to keep Prefect 1.0). |
What about simply calling |
@ofir-insait from my limited understanding of Prefect, I don't think there would be anything wrong with doing it, just a loss of granularity compared to with, say, a Kedro pipeline transformed into a Prefect flow. |
Gotcha, thanks! |
Hi! I wanted to ask if the Prefect deployment guide is going to be updated soon? Since Prefect Cloud 1.0 is going to be frozen on May 15th 2023. To keep using the service we must migrate to Prefect 2.0. |
One point to consider is that Prefect 2.0 server is not open source, so one has to use their cloud. |
@hugocool thanks for chiming in (see the Slack conversation for more context). I went and checked and apparently there is a Prefect 2.0 server: https://docs.prefect.io/2.10.11/host/ About Prefect 1.0 transition: https://www.prefect.io/guide/blog/freezing-legacy-prefect-cloud-1-accounts-on-starter-and-standard-plans/
@jmalovera10 we have limited capacity and unfortunately updating the Prefect docs is not our priority in the short term, but we would be more than happy to review community contributions. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
From this Slack thread |
@astrojuanlu thank you for replying! I understand if it is not in the priorities right now. Maybe I could help, I managed to make working example for the project I am working on. Should I make a PR for documentation? |
@jmalovera10 Yes please! 💖 |
Reviews welcome on gh-2725 🚀 |
@jmalovera10 , thanks for including me/us. also, did you figure out the mapping of the different agents used in v1 vs v2? so the dockeragent, localagent, kubernetesagent? |
@hugocool your feedback is really appreciated and I'm hoping @jmalovera10 can comment on that. In the meantime, we have merged gh-2748 which explains a simple approach that works on Prefect 2.0, hence closing the original scope of this issue. Feel free to keep discussing, or otherwise open a new issue for further improvements. |
@hugocool thanks for the question. The deployment script I adapted from Prefect 1.0 takes a pipeline and wraps Kedro nodes as Prefect tasks. This helps to keep consistent mappings between pipelines -> flows and nodes -> tasks. In the filtering example you propose, it could be done by initializing the filtered pipeline and extracting the topological order of the pipeline. Then you could wrap the nodes as tasks and execute them by topological "layers", in other words, execute the nodes that are the dependencies of other nodes. If you were to modify the script to achieve this, you could replace these pipeline declarations: pipeline = pipelines.get(pipeline_name) For this one: pipeline = filter(...) The limitation of this approach is that you must have a pipeline for the script to work. However, the filtering functions allow you to filter by node names, so providing a single node name would suffice for single node executions. On the other hand, I have only worked with the Process Block that executes a local entrypoint given an execution event received by an Agent. What changed in Prefect 2.0 is that the Agent is independent from the infrastructure, so you rely on a single Agent type and define the entrypoint of the infrastructure you want to use. I haven't tried, but my guess is that by configuring, for example, a Docker Block the deployment should be similar as for a Process Block. Let me know if this is helpful 😄 |
Heads up for people subscribed to this issue, there seem to be some issues with Kedro on Prefect under Windows #2346 |
Description
The existing deployment guides cover Prefect deployment, but not Prefect 2.0, and there have been a number of questions recently about this (e.g. https://www.linen.dev/s/kedro/t/9703126/hi-everyone-does-anyone-know-whether-kedro-supports-prefect-#d8f1e73e-ee9f-4399-ae4b-31f75d657879).
Context
Prefect 2.0 deployment should look different from deploying to the Prefect 1.x series, so it's not as simple as slightly modifying the deployment instructions. Furthermore, the Prefect deployment guide creates underlying Prefect objects (i.e. not how it's demonstrated in the tutorial, so it requires looking at Prefect source code to update properly).
Possible Implementation
N/A
Possible Alternatives
Support Prefect 2.0 as a built-in runner.
The text was updated successfully, but these errors were encountered: