mirror of
https://github.com/wassname/ray.git
synced 2026-07-13 17:45:08 +08:00
Fix incompatibility with most recent version of Redis. (#3379)
* Fix incompatibility with most recent version of Redis. * Fix * Fixes.
This commit is contained in:
committed by
Devin Petersohn
parent
18a8dbfcfb
commit
3856533065
+6
-12
@@ -713,7 +713,7 @@ class Worker(object):
|
||||
"driver_id": self.task_driver_id.id(),
|
||||
"function_id": function_to_run_id,
|
||||
"function": pickled_function,
|
||||
"run_on_other_drivers": run_on_other_drivers
|
||||
"run_on_other_drivers": str(run_on_other_drivers)
|
||||
})
|
||||
self.redis_client.rpush("Exports", key)
|
||||
# TODO(rkn): If the worker fails after it calls setnx and before it
|
||||
@@ -1446,12 +1446,8 @@ def _init(address_info=None,
|
||||
# Use 1 local scheduler if num_local_schedulers is not provided. If
|
||||
# existing local schedulers are provided, use that count as
|
||||
# num_local_schedulers.
|
||||
local_schedulers = address_info.get("local_scheduler_socket_names", [])
|
||||
if num_local_schedulers is None:
|
||||
if len(local_schedulers) > 0:
|
||||
num_local_schedulers = len(local_schedulers)
|
||||
else:
|
||||
num_local_schedulers = 1
|
||||
num_local_schedulers = 1
|
||||
# Use 1 additional redis shard if num_redis_shards is not provided.
|
||||
num_redis_shards = 1 if num_redis_shards is None else num_redis_shards
|
||||
|
||||
@@ -2013,13 +2009,13 @@ def connect(info,
|
||||
"driver_id": worker.worker_id,
|
||||
"start_time": time.time(),
|
||||
"plasma_store_socket": info["store_socket_name"],
|
||||
"local_scheduler_socket": info.get("local_scheduler_socket_name"),
|
||||
"raylet_socket": info.get("raylet_socket_name")
|
||||
}
|
||||
driver_info["name"] = (main.__file__ if hasattr(main, "__file__") else
|
||||
"INTERACTIVE MODE")
|
||||
worker.redis_client.hmset(b"Drivers:" + worker.worker_id, driver_info)
|
||||
if not worker.redis_client.exists("webui"):
|
||||
if (not worker.redis_client.exists("webui")
|
||||
and info["webui_url"] is not None):
|
||||
worker.redis_client.hmset("webui", {"url": info["webui_url"]})
|
||||
is_worker = False
|
||||
elif mode == WORKER_MODE:
|
||||
@@ -2027,7 +2023,6 @@ def connect(info,
|
||||
worker_dict = {
|
||||
"node_ip_address": worker.node_ip_address,
|
||||
"plasma_store_socket": info["store_socket_name"],
|
||||
"local_scheduler_socket": info["local_scheduler_socket_name"]
|
||||
}
|
||||
if redirect_worker_output:
|
||||
worker_dict["stdout_file"] = os.path.abspath(log_stdout_file.name)
|
||||
@@ -2041,7 +2036,7 @@ def connect(info,
|
||||
worker.plasma_client = thread_safe_client(
|
||||
plasma.connect(info["store_socket_name"], "", 64))
|
||||
|
||||
local_scheduler_socket = info["raylet_socket_name"]
|
||||
raylet_socket = info["raylet_socket_name"]
|
||||
|
||||
# If this is a driver, set the current task ID, the task driver ID, and set
|
||||
# the task index to 0.
|
||||
@@ -2100,8 +2095,7 @@ def connect(info,
|
||||
worker.multithreading_warned = False
|
||||
|
||||
worker.local_scheduler_client = ray.raylet.LocalSchedulerClient(
|
||||
local_scheduler_socket, worker.worker_id, is_worker,
|
||||
worker.current_task_id)
|
||||
raylet_socket, worker.worker_id, is_worker, worker.current_task_id)
|
||||
|
||||
# Start the import thread
|
||||
import_thread.ImportThread(worker, mode).start()
|
||||
|
||||
Reference in New Issue
Block a user