python/ray/serve/deployment.py
def bind(self, *args, **kwargs) -> Union[ClassNode, FunctionNode]:
        """Bind the provided arguments and return a class or function node.

        The returned bound deployment can be deployed or bound to other
        deployments to create a deployment graph.
        """

        copied_self = copy(self)
        copied_self._init_args = []
        copied_self._init_kwargs = {}
        copied_self._func_or_class = "dummpy.module"
        schema_shell = deployment_to_schema(copied_self)

        if inspect.isfunction(self._func_or_class):
            return FunctionNode(
                self._func_or_class,
                args,  # Used to bind and resolve DAG only, can take user input
                kwargs,  # Used to bind and resolve DAG only, can take user input
                self._ray_actor_options or dict(),
                other_args_to_resolve={
                    "deployment_schema": schema_shell,
                    "is_from_serve_deployment": True,
                },
            )
        else:
            return ClassNode(
                self._func_or_class,
                args,
                kwargs,
                cls_options=self._ray_actor_options or dict(),
                other_args_to_resolve={
                    "deployment_schema": schema_shell,
                    "is_from_serve_deployment": True,
                },
            )
Bind the provided arguments and return a class or function node.

        The returned bound deployment can be deployed or bound to other
        deployments to create a deployment graph.
        
Bind the provided arguments and return a class or function node.
The returned bound deployment can be deployed or bound to other
deployments to create a deployment graph.
Bind the provided arguments and return a class or function node . The returned bound deployment can be deployed or bound to other deployments to create a deployment graph .
def bind(self, *args, **kwargs) -> Union[ClassNode, FunctionNode]:
        copied_self = copy(self)
        copied_self._init_args = []
        copied_self._init_kwargs = {}
        copied_self._func_or_class = "dummpy.module"
        schema_shell = deployment_to_schema(copied_self)
        if inspect.isfunction(self._func_or_class):
            return FunctionNode(
                self._func_or_class,
                args,  
                kwargs,  
                self._ray_actor_options or dict(),
                other_args_to_resolve={
                    "deployment_schema": schema_shell,
                    "is_from_serve_deployment": True,
                },
            )
        else:
            return ClassNode(
                self._func_or_class,
                args,
                kwargs,
                cls_options=self._ray_actor_options or dict(),
                other_args_to_resolve={
                    "deployment_schema": schema_shell,
                    "is_from_serve_deployment": True,
                },
            )
def bind ( self , * args , ** kwargs ) -> Union [ ClassNode , FunctionNode ] : copied_self = copy ( self ) copied_self . _init_args = [ ] copied_self . _init_kwargs = { } copied_self . _func_or_class = "dummpy.module" schema_shell = deployment_to_schema ( copied_self ) if inspect . isfunction ( self . _func_or_class ) : return FunctionNode ( self . _func_or_class , args , kwargs , self . _ray_actor_options or dict ( ) , other_args_to_resolve = { "deployment_schema" : schema_shell , "is_from_serve_deployment" : True , } , ) else : return ClassNode ( self . _func_or_class , args , kwargs , cls_options = self . _ray_actor_options or dict ( ) , other_args_to_resolve = { "deployment_schema" : schema_shell , "is_from_serve_deployment" : True , } , )
Bind the provided arguments and return a class or function node.
Bind the provided arguments and return a class or function node .
"""Bind the provided arguments and return a class or function node.

        The returned bound deployment can be deployed or bound to other
        deployments to create a deployment graph.
        """ # Used to bind and resolve DAG only, can take user input # Used to bind and resolve DAG only, can take user input
self