[Serve] Make serve.run() and deployment.bind() beta APIs (#27401)

This commit is contained in:
shrekris-anyscale 2022-08-02 23:11:23 -07:00 committed by GitHub
parent 8ac6d02502
commit adc7c4dc87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -417,7 +417,7 @@ def list_deployments() -> Dict[str, Deployment]:
return _private_api.list_deployments()
@PublicAPI(stability="alpha")
@PublicAPI(stability="beta")
def run(
target: Union[ClassNode, FunctionNode],
_blocking: bool = True,
@ -435,8 +435,10 @@ def run(
A user-built Serve Application or a ClassNode that acts as the
root node of DAG. By default ClassNode is the Driver
deployment unless user provides a customized one.
host: The host passed into serve.start().
port: The port passed into serve.start().
host: Host for HTTP servers to listen on. Defaults to
"127.0.0.1". To expose Serve publicly, you probably want to set
this to "0.0.0.0".
port: Port for HTTP server. Defaults to 8000.
Returns:
RayServeHandle: A regular ray serve handle that can be called by user

View file

@ -166,7 +166,7 @@ class Deployment:
"Use `deployment.deploy() instead.`"
)
@PublicAPI(stability="alpha")
@PublicAPI(stability="beta")
def bind(self, *args, **kwargs) -> Union[ClassNode, FunctionNode]:
"""Bind the provided arguments and return a class or function node.