- ray.workflow.cancel(workflow_id: str) None #
- Cancel a workflow. Workflow checkpoints will still be saved in storage. To
clean up saved checkpoints, see
workflow_id – The workflow to cancel.
from ray import workflow @ray.remote def some_job(): return 1 workflow_task = some_job.bind() workflow.run(workflow_task, workflow_id="some_job") workflow.cancel(workflow_id="some_job") assert workflow.get_status("some_job") == workflow.CANCELED
PublicAPI (alpha): This API is in alpha and may change before becoming stable.