ray.workflow.get_output#
- ray.workflow.get_output(workflow_id: str, *, task_id: str | None = None) Any [source]#
Get the output of a running workflow.
- Parameters:
workflow_id – The workflow to get the output of.
task_id – If set, fetch the specific task instead of the output of the workflow.
Examples
from ray import workflow @ray.remote def start_trip(): return 1 trip = start_trip.options(**workflow.options(task_id="trip")).bind() res1 = workflow.run_async(trip, workflow_id="trip1") # you could "get_output()" in another machine res2 = workflow.get_output("trip1") assert ray.get(res1) == res2 task_output = workflow.get_output_async("trip1", task_id="trip") assert ray.get(task_output) == ray.get(res1)
- Returns:
The output of the workflow task.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.