[rllib] Remove need to pass around registry (#2250)

* remove registry

* fix

* too many _

* fix

* cloudpickle

* Update registry.py

* yapf

* fix test

* fix kv check
This commit is contained in:
Eric Liang
2018-06-19 22:47:00 -07:00
committed by GitHub
parent 30684446a6
commit 30f7c08ca7
36 changed files with 202 additions and 208 deletions
+8 -1
View File
@@ -1741,7 +1741,7 @@ def init(redis_address=None,
redis_address = services.address_to_ip(redis_address)
info = {"node_ip_address": node_ip_address, "redis_address": redis_address}
return _init(
ret = _init(
address_info=info,
start_ray_local=(redis_address is None),
num_workers=num_workers,
@@ -1758,6 +1758,13 @@ def init(redis_address=None,
include_webui=include_webui,
object_store_memory=object_store_memory,
use_raylet=use_raylet)
for hook in _post_init_hooks:
hook()
return ret
# Functions to run as callback after a successful ray init
_post_init_hooks = []
def cleanup(worker=global_worker):