Pascal Jahan Elahi (Pawsey)
01/15/2025, 4:17 AMasyncio.Event to add inter-task dependency? I have asked @Marvin, but its example is incorrect.Marvin
01/15/2025, 4:17 AMasyncio.Event for inter-task dependencies. However, Prefect does have its own event system for emitting and handling events, which might be more suitable for managing dependencies within Prefect flows.
You might want to consider using Prefect's built-in constructs like wait_for and signals to manage task dependencies. These are designed to work seamlessly within the Prefect ecosystem and might save you some unnecessary headaches.
Here are some resources that might be useful:
- Prefect Events Documentation
- Prefect GitHub Source Code
If you have any specific requirements or constraints, feel free to share, and I can help you explore other options.Janet Carson
01/15/2025, 5:44 PMPascal Jahan Elahi (Pawsey)
01/16/2025, 2:45 AMasyncio.Event when running on a short lived prefect server?Marvin
01/16/2025, 2:45 AMasyncio.Event with Prefect, especially when dealing with DaskTaskRunner across different nodes, might indeed cause issues like hanging, particularly if you're using a short-lived local Prefect server. Here are some considerations:
1. DaskTaskRunner: Prefect's DaskTaskRunner submits tasks to the Dask distributed scheduler, and by default, creates a temporary Dask cluster for the flow run. If you're using a local server, ensure that the Dask cluster is correctly configured and accessible across all nodes. Dask Integration
2. Asyncio and Events: Prefect's event system is designed to emit events from flows, tasks, and other objects, but asyncio.Event handling can be tricky in distributed settings. Ensure that your event handling logic is robust against network latencies or interruptions.
3. Common 3.x Gotchas: Prefect 3.x has replaced some core components, like agents with workers, which might affect how tasks are scheduled and run. Ensure your setup aligns with these changes. Prefect 3.x Gotchas
4. GitHub Issues: There don't appear to be any open issues related directly to asyncio.Event hanging with DaskTaskRunner, but it's always wise to keep an eye on the repository for any updates.
If you're encountering persistent issues, consider running your setup on a more stable Prefect server or cloud-hosted Dask cluster to rule out local server constraints.Janet Carson
01/16/2025, 5:48 PMPascal Jahan Elahi (Pawsey)
01/17/2025, 2:03 AMPascal Jahan Elahi (Pawsey)
01/17/2025, 2:05 AMJanet Carson
01/17/2025, 5:13 PMPascal Jahan Elahi (Pawsey)
01/20/2025, 2:17 AMprefect isn’t up to it but then, I haven’t found a workflow manager that is up to it and prefect seemed like a good start pointJanet Carson
01/21/2025, 5:00 PMPascal Jahan Elahi (Pawsey)
01/23/2025, 7:18 AMPascal Jahan Elahi (Pawsey)
01/23/2025, 7:18 AMJanet Carson
01/23/2025, 4:57 PMPascal Jahan Elahi (Pawsey)
01/24/2025, 2:01 AM