Skip to content

Commit cb53cb9

Browse files
Cleanups.
1 parent e0c65e7 commit cb53cb9

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

lib/python/ray/services.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,11 @@
1010
# Ray modules
1111
import config
1212

13-
_services_env = os.environ.copy()
14-
_services_env["PATH"] = os.pathsep.join([os.path.dirname(os.path.abspath(__file__)), _services_env["PATH"]])
15-
# Make GRPC only print error messages.
16-
_services_env["GRPC_VERBOSITY"] = "ERROR"
17-
1813
# all_processes is a list of the scheduler, object store, and worker processes
1914
# that have been started by this services module if Ray is being used in local
2015
# mode.
2116
all_processes = []
2217

23-
TIMEOUT_SECONDS = 5
24-
2518
def address(host, port):
2619
return host + ":" + str(port)
2720

lib/python/ray/worker.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def print_error_messages(worker):
710710
# we catch here.
711711
pass
712712

713-
def fetch_and_process_remote_function(key, worker=global_worker):
713+
def fetch_and_register_remote_function(key, worker=global_worker):
714714
"""Import a remote function."""
715715
function_id_str, function_name, serialized_function, num_return_vals, module, function_export_counter = worker.redis_client.hmget(key, ["function_id", "name", "function", "num_return_vals", "module", "driver_export_counter"])
716716
function_id = photon.ObjectID(function_id_str)
@@ -738,7 +738,7 @@ def fetch_and_process_remote_function(key, worker=global_worker):
738738
# Add the function to the function table.
739739
worker.redis_client.rpush("FunctionTable:{}".format(function_id.id()), worker.worker_id)
740740

741-
def fetch_and_process_reusable_variable(key, worker=global_worker):
741+
def fetch_and_register_reusable_variable(key, worker=global_worker):
742742
"""Import a reusable variable."""
743743
reusable_variable_name, serialized_initializer, serialized_reinitializer = worker.redis_client.hmget(key, ["name", "initializer", "reinitializer"])
744744
try:
@@ -755,7 +755,7 @@ def fetch_and_process_reusable_variable(key, worker=global_worker):
755755
"message": traceback_str})
756756
worker.redis_client.rpush("ErrorKeys", error_key)
757757

758-
def fetch_and_process_function_to_run(key, worker=global_worker):
758+
def fetch_and_execute_function_to_run(key, worker=global_worker):
759759
"""Run on arbitrary function on the worker."""
760760
serialized_function, = worker.redis_client.hmget(key, ["function"])
761761
try:
@@ -790,11 +790,11 @@ def import_thread(worker):
790790
export_keys = worker.redis_client.lrange("Exports", 0, -1)
791791
for key in export_keys:
792792
if key.startswith("RemoteFunction"):
793-
fetch_and_process_remote_function(key, worker=worker)
793+
fetch_and_register_remote_function(key, worker=worker)
794794
elif key.startswith("ReusableVariables"):
795-
fetch_and_process_reusable_variable(key, worker=worker)
795+
fetch_and_register_reusable_variable(key, worker=worker)
796796
elif key.startswith("FunctionsToRun"):
797-
fetch_and_process_function_to_run(key, worker=worker)
797+
fetch_and_execute_function_to_run(key, worker=worker)
798798
else:
799799
raise Exception("This code should be unreachable.")
800800
worker.redis_client.hincrby(worker_info_key, "export_counter", 1)
@@ -813,11 +813,11 @@ def import_thread(worker):
813813
for i in range(worker.worker_import_counter, num_imports):
814814
key = worker.redis_client.lindex("Exports", i)
815815
if key.startswith("RemoteFunction"):
816-
fetch_and_process_remote_function(key, worker=worker)
816+
fetch_and_register_remote_function(key, worker=worker)
817817
elif key.startswith("ReusableVariables"):
818-
fetch_and_process_reusable_variable(key, worker=worker)
818+
fetch_and_register_reusable_variable(key, worker=worker)
819819
elif key.startswith("FunctionsToRun"):
820-
fetch_and_process_function_to_run(key, worker=worker)
820+
fetch_and_execute_function_to_run(key, worker=worker)
821821
else:
822822
raise Exception("This code should be unreachable.")
823823
worker.redis_client.hincrby(worker_info_key, "export_counter", 1)

0 commit comments

Comments
 (0)