PrefectHQ / prefect-ray

Prefect integrations with Ray
https://prefecthq.github.io/prefect-ray/
Apache License 2.0
63 stars 5 forks source link

Ensure that logs from Ray workers are propagated to the Prefect backend #63

Closed anna-geller closed 1 year ago

anna-geller commented 1 year ago

This is a follow-up issue to this PR - this QA comment shows it still doesn't work for Ray TTBOMK.

LMK if you need more info or help with QA

This issue is a blocker for LiveEO usage of RayTaskRunner

cc @madkinsz

ahuang11 commented 1 year ago

I was unable to reproduce with:

from prefect import flow, get_run_logger, task
from prefect_ray.task_runners import RayTaskRunner

@task
def bar():
    get_run_logger().info("bar")

@flow(task_runner=RayTaskRunner)
def foo():
    get_run_logger().info("foo")
    bar.submit()

if __name__ == "__main__":
    foo()

On prefect 2.7.1, ray 2.1.0, and prefect-ray 0.2.2.

Here, it shows begin_task_run pid=15840) 15:05:28.157 | INFO | Task run 'bar-8897b405-0' - bar (although it's missing color) image

Also in notebook: image

Lastly, it shows up on UI as well image

anna-geller commented 1 year ago

Great work, and sorry for the noise. Indeed, everything works on 2.7.1

image

ahuang11 commented 1 year ago

Thanks for verifying!