Allow address instead of redis_address (#5412)

* addr

* wip

* fix typo

* add to start

* switch to ray address for train

* say address

* disambiguate help

* comments 2
This commit is contained in:
Eric Liang
2019-08-10 00:18:41 -07:00
committed by GitHub
parent 7e8a4a62ea
commit df47bdf6c9
4 changed files with 61 additions and 37 deletions
+10
View File
@@ -1262,6 +1262,7 @@ def _initialize_serialization(job_id, worker=global_worker):
def init(redis_address=None,
address=None,
num_cpus=None,
num_gpus=None,
resources=None,
@@ -1313,6 +1314,7 @@ def init(redis_address=None,
this address is not provided, then this command will start Redis, a
raylet, a plasma store, a plasma manager, and some workers.
It will also kill these processes when Python exits.
address (str): Same as redis_address.
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
@@ -1376,6 +1378,14 @@ def init(redis_address=None,
arguments is passed in.
"""
if address:
if redis_address:
raise ValueError(
"You should specify address instead of redis_address.")
if address == "auto":
address = services.find_redis_address_or_die()
redis_address = address
if configure_logging:
setup_logger(logging_level, logging_format)