python/ray/workflow/step_executor.py
def execute_workflow(workflow: Workflow) -> "WorkflowExecutionResult":
    """Execute workflow.

    This function also performs tail-recursion optimization for inplace
    workflow steps.

    Args:
        workflow: The workflow to be executed.
    Returns:
        An object ref that represent the result.
    """
    # Tail recursion optimization.
    context = {}
    while True:
        with workflow_context.fork_workflow_step_context(**context):
            result = _execute_workflow(workflow)
        if not isinstance(result.persisted_output, InplaceReturnedWorkflow):
            break
        workflow = result.persisted_output.workflow
        context = result.persisted_output.context

    # Convert the outputs into WorkflowStaticRef.
    result.persisted_output = WorkflowStaticRef.from_output(
        workflow.step_id, result.persisted_output
    )
    result.volatile_output = WorkflowStaticRef.from_output(
        workflow.step_id, result.volatile_output
    )
    return result
Execute workflow.

    This function also performs tail-recursion optimization for inplace
    workflow steps.

    Args:
        workflow: The workflow to be executed.
    Returns:
        An object ref that represent the result.
    
Execute workflow.
This function also performs tail-recursion optimization for inplace
workflow steps.
Execute workflow . This function also performs tail - recursion optimization for inplace workflow steps .
def execute_workflow(workflow: Workflow) -> "WorkflowExecutionResult":
    context = {}
    while True:
        with workflow_context.fork_workflow_step_context(**context):
            result = _execute_workflow(workflow)
        if not isinstance(result.persisted_output, InplaceReturnedWorkflow):
            break
        workflow = result.persisted_output.workflow
        context = result.persisted_output.context
    result.persisted_output = WorkflowStaticRef.from_output(
        workflow.step_id, result.persisted_output
    )
    result.volatile_output = WorkflowStaticRef.from_output(
        workflow.step_id, result.volatile_output
    )
    return result
def execute_workflow ( workflow : Workflow ) -> "WorkflowExecutionResult" : context = { } while True : with workflow_context . fork_workflow_step_context ( ** context ) : result = _execute_workflow ( workflow ) if not isinstance ( result . persisted_output , InplaceReturnedWorkflow ) : break workflow = result . persisted_output . workflow context = result . persisted_output . context result . persisted_output = WorkflowStaticRef . from_output ( workflow . step_id , result . persisted_output ) result . volatile_output = WorkflowStaticRef . from_output ( workflow . step_id , result . volatile_output ) return result
Execute workflow.
Execute workflow .
"""Execute workflow.

    This function also performs tail-recursion optimization for inplace
    workflow steps.

    Args:
        workflow: The workflow to be executed.
    Returns:
        An object ref that represent the result.
    """ # Tail recursion optimization. # Convert the outputs into WorkflowStaticRef.
An object ref that represent the result.
An object ref that represent the result .
workflow
Workflow
The workflow to be executed.
The workflow to be executed .