mirror of
https://github.com/wassname/ray.git
synced 2026-07-27 11:26:41 +08:00
Remove ref counting dependencies on ray.get() (#6412)
* Remove ref counting dependencies on Get() * comment * don't send IDs when disabled * pass through internal config * fix * allow reinit * remove flag
This commit is contained in:
@@ -795,7 +795,9 @@ def init(address=None,
|
||||
log_to_driver=log_to_driver,
|
||||
worker=global_worker,
|
||||
driver_object_store_memory=driver_object_store_memory,
|
||||
job_id=job_id)
|
||||
job_id=job_id,
|
||||
internal_config=json.loads(_internal_config)
|
||||
if _internal_config else {})
|
||||
|
||||
for hook in _post_init_hooks:
|
||||
hook()
|
||||
@@ -1064,7 +1066,8 @@ def connect(node,
|
||||
log_to_driver=False,
|
||||
worker=global_worker,
|
||||
driver_object_store_memory=None,
|
||||
job_id=None):
|
||||
job_id=None,
|
||||
internal_config=None):
|
||||
"""Connect this worker to the raylet, to Plasma, and to Redis.
|
||||
|
||||
Args:
|
||||
@@ -1077,6 +1080,8 @@ def connect(node,
|
||||
driver_object_store_memory: Limit the amount of memory the driver can
|
||||
use in the object store when creating objects.
|
||||
job_id: The ID of job. If it's None, then we will generate one.
|
||||
internal_config: Dictionary of (str,str) containing internal config
|
||||
options to override the defaults.
|
||||
"""
|
||||
# Do some basic checking to make sure we didn't call ray.init twice.
|
||||
error_message = "Perhaps you called ray.init twice by accident?"
|
||||
@@ -1087,6 +1092,8 @@ def connect(node,
|
||||
if not faulthandler.is_enabled():
|
||||
faulthandler.enable(all_threads=False)
|
||||
|
||||
ray._raylet.set_internal_config(internal_config)
|
||||
|
||||
if mode is not LOCAL_MODE:
|
||||
# Create a Redis client to primary.
|
||||
# The Redis client can safely be shared between threads. However,
|
||||
|
||||
Reference in New Issue
Block a user