Cleaning up remaining Local Mode Code (#7865)

This commit is contained in:
ijrsvt 2020-04-03 17:54:15 -07:00 committed by GitHub
parent 185d591108
commit e03f687b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 25 deletions

View file

@ -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)

View file

@ -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:

View file

@ -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.