mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[Serve] Make serve.run()
and deployment.bind()
beta APIs (#27401)
This commit is contained in:
parent
8ac6d02502
commit
adc7c4dc87
2 changed files with 6 additions and 4 deletions
|
@ -417,7 +417,7 @@ def list_deployments() -> Dict[str, Deployment]:
|
||||||
return _private_api.list_deployments()
|
return _private_api.list_deployments()
|
||||||
|
|
||||||
|
|
||||||
@PublicAPI(stability="alpha")
|
@PublicAPI(stability="beta")
|
||||||
def run(
|
def run(
|
||||||
target: Union[ClassNode, FunctionNode],
|
target: Union[ClassNode, FunctionNode],
|
||||||
_blocking: bool = True,
|
_blocking: bool = True,
|
||||||
|
@ -435,8 +435,10 @@ def run(
|
||||||
A user-built Serve Application or a ClassNode that acts as the
|
A user-built Serve Application or a ClassNode that acts as the
|
||||||
root node of DAG. By default ClassNode is the Driver
|
root node of DAG. By default ClassNode is the Driver
|
||||||
deployment unless user provides a customized one.
|
deployment unless user provides a customized one.
|
||||||
host: The host passed into serve.start().
|
host: Host for HTTP servers to listen on. Defaults to
|
||||||
port: The port passed into serve.start().
|
"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:
|
Returns:
|
||||||
RayServeHandle: A regular ray serve handle that can be called by user
|
RayServeHandle: A regular ray serve handle that can be called by user
|
||||||
|
|
|
@ -166,7 +166,7 @@ class Deployment:
|
||||||
"Use `deployment.deploy() instead.`"
|
"Use `deployment.deploy() instead.`"
|
||||||
)
|
)
|
||||||
|
|
||||||
@PublicAPI(stability="alpha")
|
@PublicAPI(stability="beta")
|
||||||
def bind(self, *args, **kwargs) -> Union[ClassNode, FunctionNode]:
|
def bind(self, *args, **kwargs) -> Union[ClassNode, FunctionNode]:
|
||||||
"""Bind the provided arguments and return a class or function node.
|
"""Bind the provided arguments and return a class or function node.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue