python/ray/serve/pipeline/generate.py
def extract_deployments_from_serve_dag(
    serve_dag_root: DAGNode,
) -> List[Deployment]:
    """Extract deployment python objects from a transformed serve DAG. Should
    only be called after `transform_ray_dag_to_serve_dag`, otherwise nothing
    to return.

    Args:
        serve_dag_root (DAGNode): Transformed serve dag root node.
    Returns:
        deployments (List[Deployment]): List of deployment python objects
            fetched from serve dag.
    """
    deployments = OrderedDict()

    def extractor(dag_node):
        if isinstance(dag_node, (DeploymentNode, DeploymentFunctionNode)):
            deployment = dag_node._deployment
            # In case same deployment is used in multiple DAGNodes
            deployments[deployment.name] = deployment
        return dag_node

    serve_dag_root.apply_recursive(extractor)

    return list(deployments.values())
Extract deployment python objects from a transformed serve DAG. Should
    only be called after `transform_ray_dag_to_serve_dag`, otherwise nothing
    to return.

    Args:
        serve_dag_root (DAGNode): Transformed serve dag root node.
    Returns:
        deployments (List[Deployment]): List of deployment python objects
            fetched from serve dag.
    
Extract deployment python objects from a transformed serve DAG. Should
only be called after `transform_ray_dag_to_serve_dag`, otherwise nothing
to return.
Extract deployment python objects from a transformed serve DAG . Should only be called after ` transform_ray_dag_to_serve_dag ` otherwise nothing to return .
def extract_deployments_from_serve_dag(
    serve_dag_root: DAGNode,
) -> List[Deployment]:
    deployments = OrderedDict()
    def extractor(dag_node):
        if isinstance(dag_node, (DeploymentNode, DeploymentFunctionNode)):
            deployment = dag_node._deployment
            deployments[deployment.name] = deployment
        return dag_node
    serve_dag_root.apply_recursive(extractor)
    return list(deployments.values())
def extract_deployments_from_serve_dag ( serve_dag_root : DAGNode , ) -> List [ Deployment ] : deployments = OrderedDict ( ) def extractor ( dag_node ) : if isinstance ( dag_node , ( DeploymentNode , DeploymentFunctionNode ) ) : deployment = dag_node . _deployment deployments [ deployment . name ] = deployment return dag_node serve_dag_root . apply_recursive ( extractor ) return list ( deployments . values ( ) )
Extract deployment python objects from a transformed serve DAG.
Extract deployment python objects from a transformed serve DAG .
"""Extract deployment python objects from a transformed serve DAG. Should
    only be called after `transform_ray_dag_to_serve_dag`, otherwise nothing
    to return.

    Args:
        serve_dag_root (DAGNode): Transformed serve dag root node.
    Returns:
        deployments (List[Deployment]): List of deployment python objects
            fetched from serve dag.
    """ # In case same deployment is used in multiple DAGNodes
deployments (List[Deployment]): List of deployment python objects
fetched from serve dag.
deployments ( List [ Deployment ] ) : List of deployment python objects fetched from serve dag .
serve_dag_root
DAGNode
Transformed serve dag root node.
Transformed serve dag root node .