mirror of
https://github.com/wassname/ray.git
synced 2026-08-07 11:27:43 +08:00
Remove local/global_scheduler from code and doc. (#4549)
This commit is contained in:
committed by
Philipp Moritz
parent
51dae23d5c
commit
c2349cf12d
+16
-17
@@ -538,7 +538,7 @@ class Worker(object):
|
||||
unready_ids.pop(object_id)
|
||||
|
||||
# If there were objects that we weren't able to get locally,
|
||||
# let the local scheduler know that we're now unblocked.
|
||||
# let the raylet know that we're now unblocked.
|
||||
self.raylet_client.notify_unblocked(self.current_task_id)
|
||||
|
||||
assert len(final_results) == len(object_ids)
|
||||
@@ -609,14 +609,14 @@ class Worker(object):
|
||||
|
||||
# Put large or complex arguments that are passed by value in the
|
||||
# object store first.
|
||||
args_for_local_scheduler = []
|
||||
args_for_raylet = []
|
||||
for arg in args:
|
||||
if isinstance(arg, ObjectID):
|
||||
args_for_local_scheduler.append(arg)
|
||||
args_for_raylet.append(arg)
|
||||
elif ray._raylet.check_simple_value(arg):
|
||||
args_for_local_scheduler.append(arg)
|
||||
args_for_raylet.append(arg)
|
||||
else:
|
||||
args_for_local_scheduler.append(put(arg))
|
||||
args_for_raylet.append(put(arg))
|
||||
|
||||
# By default, there are no execution dependencies.
|
||||
if execution_dependencies is None:
|
||||
@@ -651,14 +651,14 @@ class Worker(object):
|
||||
# Current driver id must not be nil when submitting a task.
|
||||
# Because every task must belong to a driver.
|
||||
assert not self.task_driver_id.is_nil()
|
||||
# Submit the task to local scheduler.
|
||||
# Submit the task to raylet.
|
||||
function_descriptor_list = (
|
||||
function_descriptor.get_function_descriptor_list())
|
||||
assert isinstance(driver_id, DriverID)
|
||||
task = ray._raylet.Task(
|
||||
driver_id,
|
||||
function_descriptor_list,
|
||||
args_for_local_scheduler,
|
||||
args_for_raylet,
|
||||
num_return_vals,
|
||||
self.current_task_id,
|
||||
self.task_context.task_index,
|
||||
@@ -998,11 +998,11 @@ class Worker(object):
|
||||
self.raylet_client.disconnect()
|
||||
sys.exit(0)
|
||||
|
||||
def _get_next_task_from_local_scheduler(self):
|
||||
"""Get the next task from the local scheduler.
|
||||
def _get_next_task_from_raylet(self):
|
||||
"""Get the next task from the raylet.
|
||||
|
||||
Returns:
|
||||
A task from the local scheduler.
|
||||
A task from the raylet.
|
||||
"""
|
||||
with profiling.profile("worker_idle"):
|
||||
task = self.raylet_client.get_task()
|
||||
@@ -1022,7 +1022,7 @@ class Worker(object):
|
||||
signal.signal(signal.SIGTERM, exit)
|
||||
|
||||
while True:
|
||||
task = self._get_next_task_from_local_scheduler()
|
||||
task = self._get_next_task_from_raylet()
|
||||
self._wait_for_and_process_task(task)
|
||||
|
||||
|
||||
@@ -1319,12 +1319,11 @@ def init(redis_address=None,
|
||||
Args:
|
||||
redis_address (str): The address of the Redis server to connect to. If
|
||||
this address is not provided, then this command will start Redis, a
|
||||
global scheduler, a local scheduler, a plasma store, a plasma
|
||||
manager, and some workers. It will also kill these processes when
|
||||
Python exits.
|
||||
num_cpus (int): Number of cpus the user wishes all local schedulers to
|
||||
raylet, a plasma store, a plasma manager, and some workers.
|
||||
It will also kill these processes when Python exits.
|
||||
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 local schedulers to
|
||||
num_gpus (int): Number of gpus the user wishes all raylets to
|
||||
be configured with.
|
||||
resources: A dictionary mapping the name of a resource to the quantity
|
||||
of that resource available.
|
||||
@@ -1791,7 +1790,7 @@ def connect(info,
|
||||
worker=global_worker,
|
||||
driver_id=None,
|
||||
load_code_from_local=False):
|
||||
"""Connect this worker to the local scheduler, to Plasma, and to Redis.
|
||||
"""Connect this worker to the raylet, to Plasma, and to Redis.
|
||||
|
||||
Args:
|
||||
info (dict): A dictionary with address of the Redis server and the
|
||||
|
||||
Reference in New Issue
Block a user