ray.workflow.resume_all#
- ray.workflow.resume_all(include_failed: bool = False) List[Tuple[str, ray._raylet.ObjectRef]] [源代码]#
恢复所有可恢复的工作流作业。
这可以在集群重启后用于恢复所有任务。
- 参数:
include_failed – 是否恢复失败的流程。
示例
from ray import workflow @ray.remote def failed_job(): raise ValueError() workflow_task = failed_job.bind() output = workflow.run_async( workflow_task, workflow_id="failed_job") try: ray.get(output) except Exception: print("JobFailed") assert workflow.get_status("failed_job") == workflow.FAILED print(workflow.resume_all(include_failed=True))
JobFailed [('failed_job', ObjectRef(...))]
- 返回:
恢复的 (workflow_id, returned_obj_ref) 列表。
PublicAPI (alpha): 此API处于alpha阶段,可能在稳定之前发生变化。