I did exactly as instructed here, but I cannot see the log in a task anywhere. Unless I am looking at the wrong place.
Kha Nguyen
08/02/2022, 5:55 PM
Oh, I see now why I don’t have log. It is because I am using RayTaskRunner. If I remove this runner, then I can see log.
Kha Nguyen
08/02/2022, 5:56 PM
Should prefect still capture the logs from ray worker though?
b
Bianca Hoch
08/02/2022, 7:32 PM
Hello Kha, to my understanding you should still be able to capture the logs when using RayTaskRunner. Are you able to reproduce this example? https://discourse.prefect.io/t/raytaskrunner-freezes-when-writing-data-to-a-local-directory/704/3 . The article also mentions an issue that a user had using RayTaskRunner, and that it freezes when a large number of tasks are run, maybe that is similar to what you are experiencing here? How many tasks are you executing? If the problem persists, I'd also recommend creating a GitHub issue, and sharing a simplified version of your code here for troubleshooting.
Bianca Hoch
08/02/2022, 7:40 PM
Also - quick note from the bottom of the article: Note to anyone using
DaskTaskRunner
or `RayTaskRunner`: from prefect version
2.0b8
onwards, those task runners were moved to the respective Prefect Collections for better code dependency management (the core library no longer requires dask or ray as dependencies - now, those can be installed separately when needed).
The correct imports are now:
Copy code
from prefect_dask import DaskTaskRunner
from prefect_ray import RayTaskRunner
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.