mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Cleaning up remaining Local Mode Code (#7865)
This commit is contained in:
parent
185d591108
commit
e03f687b84
3 changed files with 0 additions and 25 deletions
|
@ -12,8 +12,6 @@ def _internal_kv_get(key):
|
|||
"""Fetch the value of a binary key."""
|
||||
|
||||
worker = ray.worker.global_worker
|
||||
if worker.mode == ray.worker.LOCAL_MODE:
|
||||
return _local.get(key)
|
||||
|
||||
return worker.redis_client.hget(key, "value")
|
||||
|
||||
|
@ -28,11 +26,6 @@ def _internal_kv_put(key, value, overwrite=False):
|
|||
"""
|
||||
|
||||
worker = ray.worker.global_worker
|
||||
if worker.mode == ray.worker.LOCAL_MODE:
|
||||
exists = key in _local
|
||||
if not exists or overwrite:
|
||||
_local[key] = value
|
||||
return exists
|
||||
|
||||
if overwrite:
|
||||
updated = worker.redis_client.hset(key, "value", value)
|
||||
|
|
|
@ -69,10 +69,6 @@ def free(object_ids, local_only=False, delete_creating_tasks=False):
|
|||
raise TypeError("Attempting to call `free` on the value {}, "
|
||||
"which is not an ray.ObjectID.".format(object_id))
|
||||
|
||||
if ray.worker._mode() == ray.worker.LOCAL_MODE:
|
||||
worker.local_mode_manager.free(object_ids)
|
||||
return
|
||||
|
||||
worker.check_connected()
|
||||
with profiling.profile("ray.free"):
|
||||
if len(object_ids) == 0:
|
||||
|
|
|
@ -921,17 +921,3 @@ class Node:
|
|||
True if any process that wasn't explicitly killed is still alive.
|
||||
"""
|
||||
return not any(self.dead_processes())
|
||||
|
||||
|
||||
# TODO(ilr) Remove this soon
|
||||
class LocalNode:
|
||||
"""Imitate the node that manages the processes in local mode."""
|
||||
|
||||
def kill_all_processes(self, *args, **kwargs):
|
||||
"""Kill all of the processes."""
|
||||
pass # Keep this function empty because it will be used in worker.py
|
||||
|
||||
@property
|
||||
def address_info(self):
|
||||
"""Get a dictionary of addresses."""
|
||||
return {} # Return a null dict.
|
||||
|
|
Loading…
Add table
Reference in a new issue