mirror of
https://github.com/wassname/ray.git
synced 2026-07-09 22:55:12 +08:00
[GCS] global state query node info table from GCS. (#8498)
This commit is contained in:
@@ -105,8 +105,10 @@ def _ray_start_cluster(**kwargs):
|
||||
remote_nodes = []
|
||||
for _ in range(num_nodes):
|
||||
remote_nodes.append(cluster.add_node(**init_kwargs))
|
||||
if do_init:
|
||||
ray.init(address=cluster.address)
|
||||
# We assume driver will connect to the head (first node),
|
||||
# so ray init will be invoked if do_init is true
|
||||
if len(remote_nodes) == 1 and do_init:
|
||||
ray.init(address=cluster.address)
|
||||
yield cluster
|
||||
# The code after the yield will run as teardown code.
|
||||
ray.shutdown()
|
||||
|
||||
Reference in New Issue
Block a user