ray.workflow.resume_async#

ray.workflow.resume_async(workflow_id: str) ray._raylet.ObjectRef[source]#

Resume a workflow asynchronously.

Resume a workflow and retrieve its output. If the workflow was incomplete, it will be re-executed from its checkpointed outputs. If the workflow was complete, returns the result immediately.

Examples

from ray import workflow

@ray.remote
def start_trip():
    return 3

trip = start_trip.bind()
res1 = workflow.run_async(trip, workflow_id="trip1")
res2 = workflow.resume_async("trip1")
assert ray.get(res1) == ray.get(res2)
Parameters:

workflow_id – The id of the workflow to resume.

Returns:

An object reference that can be used to retrieve the workflow result.

PublicAPI (alpha): This API is in alpha and may change before becoming stable.