mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[serve] Remove start_server flag (#8620)
This commit is contained in:
parent
b3d686b78f
commit
137519e19d
2 changed files with 6 additions and 12 deletions
|
@ -62,7 +62,6 @@ def accept_batch(f):
|
|||
|
||||
def init(cluster_name=None,
|
||||
blocking=False,
|
||||
start_server=True,
|
||||
http_host=DEFAULT_HTTP_HOST,
|
||||
http_port=DEFAULT_HTTP_PORT,
|
||||
ray_init_kwargs={
|
||||
|
@ -84,8 +83,6 @@ def init(cluster_name=None,
|
|||
specified in all subsequent serve.init() calls.
|
||||
blocking (bool): If true, the function will wait for the HTTP server to
|
||||
be healthy, and other components to be ready before returns.
|
||||
start_server (bool): If true, `serve.init` starts http server.
|
||||
(Default: True)
|
||||
http_host (str): Host for HTTP server. Default to "0.0.0.0".
|
||||
http_port (int): Port for HTTP server. Default to 8000.
|
||||
ray_init_kwargs (dict): Argument passed to ray.init, if there is no ray
|
||||
|
@ -126,10 +123,9 @@ def init(cluster_name=None,
|
|||
master_actor = ServeMaster.options(
|
||||
name=master_actor_name,
|
||||
max_restarts=-1,
|
||||
).remote(cluster_name, start_server, http_node_id, http_host, http_port,
|
||||
metric_exporter)
|
||||
).remote(cluster_name, http_node_id, http_host, http_port, metric_exporter)
|
||||
|
||||
if start_server and blocking:
|
||||
if blocking:
|
||||
block_until_http_ready("http://{}:{}/-/routes".format(
|
||||
http_host, http_port))
|
||||
|
||||
|
|
|
@ -50,9 +50,8 @@ class ServeMaster:
|
|||
requires all implementations here to be idempotent.
|
||||
"""
|
||||
|
||||
async def __init__(self, cluster_name, start_http_proxy, http_node_id,
|
||||
http_proxy_host, http_proxy_port,
|
||||
metric_exporter_class):
|
||||
async def __init__(self, cluster_name, http_node_id, http_proxy_host,
|
||||
http_proxy_port, metric_exporter_class):
|
||||
# Unique name of the serve cluster managed by this actor. Used to
|
||||
# namespace child actors and checkpoints.
|
||||
self.cluster_name = cluster_name
|
||||
|
@ -93,7 +92,6 @@ class ServeMaster:
|
|||
# components. If recovering, fetches their actor handles.
|
||||
self._get_or_start_metric_exporter(metric_exporter_class)
|
||||
self._get_or_start_router()
|
||||
if start_http_proxy:
|
||||
self._get_or_start_http_proxy(http_node_id, http_proxy_host,
|
||||
http_proxy_port)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue