[autoscaler] port-forward for attach + redis_port (#7145)

* port-forward

* fixport

* force redis port in init mode

* test

* Update python/ray/tests/test_ray_init.py
This commit is contained in:
Richard Liaw
2020-02-14 15:17:00 -08:00
committed by GitHub
parent 30de1286bd
commit 52d9189d5d
4 changed files with 35 additions and 4 deletions
+4
View File
@@ -535,6 +535,7 @@ def print_failed_task(task_status):
def init(address=None,
redis_address=None,
redis_port=None,
num_cpus=None,
num_gpus=None,
memory=None,
@@ -592,6 +593,8 @@ def init(address=None,
raylet, a plasma store, a plasma manager, and some workers.
It will also kill these processes when Python exits.
redis_address (str): Deprecated; same as address.
redis_port (int): The port that the primary Redis shard should listen
to. If None, then a random port will be chosen.
num_cpus (int): Number of cpus the user wishes all raylets to
be configured with.
num_gpus (int): Number of gpus the user wishes all raylets to
@@ -714,6 +717,7 @@ def init(address=None,
# In this case, we need to start a new cluster.
ray_params = ray.parameter.RayParams(
redis_address=redis_address,
redis_port=redis_port,
node_ip_address=node_ip_address,
object_id_seed=object_id_seed,
local_mode=local_mode,