Ray Workflows is built on top of Ray, and offers a mostly consistent subset of its API while providing durability. This section highlights some of the differences:
With Ray tasks, func.remote
will submit a remote task to run eagerly; func.bind
will generate a node in a DAG, it will not be executed until the DAG is been executed.
Under the context of Ray Workflow, the execution of the DAG is deferred until workflow.run(dag, workflow_id=...)
or workflow.run_async(dag, workflow_id=...)
is called on the DAG. Specifying the workflow id allows for resuming of the workflow by its id in case of cluster failure.
Note: these comparisons are inspired by the Serverless workflows comparisons repo.
The original source of these comparisons can be found here.
../../../python/ray/workflow/examples/comparisons/argo/conditionals_argo.yaml
../../../python/ray/workflow/examples/comparisons/argo/conditionals_workflow.py
../../../python/ray/workflow/examples/comparisons/argo/dag_argo.yaml
../../../python/ray/workflow/examples/comparisons/argo/dag_workflow.py
../../../python/ray/workflow/examples/comparisons/argo/multi_step_argo.yaml
../../../python/ray/workflow/examples/comparisons/argo/multi_step_workflow.py
../../../python/ray/workflow/examples/comparisons/argo/exit_handler_argo.yaml
../../../python/ray/workflow/examples/comparisons/argo/exit_handler_workflow.py
../../../python/ray/workflow/examples/comparisons/argo/loops_argo.yaml
../../../python/ray/workflow/examples/comparisons/argo/loops_workflow.py
../../../python/ray/workflow/examples/comparisons/argo/recursion_argo.yaml
../../../python/ray/workflow/examples/comparisons/argo/recursion_workflow.py
../../../python/ray/workflow/examples/comparisons/argo/retry_argo.yaml
../../../python/ray/workflow/examples/comparisons/argo/retry_workflow.py
The original source of these comparisons can be found here.
../../../python/ray/workflow/examples/comparisons/metaflow/foreach_metaflow.py.txt
../../../python/ray/workflow/examples/comparisons/metaflow/foreach_workflow.py
The original source of these comparisons can be found here.
../../../python/ray/workflow/examples/comparisons/cadence/sub_workflow_cadence.java
../../../python/ray/workflow/examples/comparisons/cadence/sub_workflow_workflow.py
../../../python/ray/workflow/examples/comparisons/cadence/file_processing_cadence.java
../../../python/ray/workflow/examples/comparisons/cadence/file_processing_workflow.py
../../../python/ray/workflow/examples/comparisons/cadence/trip_booking_cadence.java
../../../python/ray/workflow/examples/comparisons/cadence/trip_booking_workflow.py
The original source of these comparisons can be found here.
../../../python/ray/workflow/examples/comparisons/google_cloud_workflows/data_cond_google.yaml
../../../python/ray/workflow/examples/comparisons/google_cloud_workflows/data_cond_workflow.py
../../../python/ray/workflow/examples/comparisons/google_cloud_workflows/concat_array_google.yaml
../../../python/ray/workflow/examples/comparisons/google_cloud_workflows/concat_array_workflow.py
../../../python/ray/workflow/examples/comparisons/google_cloud_workflows/sub_workflows_google.yaml
../../../python/ray/workflow/examples/comparisons/google_cloud_workflows/sub_workflows_workflow.py
The original source of these comparisons can be found here.
../../../python/ray/workflow/examples/comparisons/prefect/compute_fib_prefect.py.txt
../../../python/ray/workflow/examples/comparisons/prefect/compute_fib_workflow.py
The original source of these comparisons can be found here.
../../../python/ray/workflow/examples/comparisons/airflow/etl_airflow.py.txt
../../../python/ray/workflow/examples/comparisons/airflow/etl_workflow.py