mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 01:16:06 +08:00
Fix CI test failures (#4007)
This commit is contained in:
@@ -26,7 +26,7 @@ from ray.tune.logger import pretty_print, UnifiedLogger
|
||||
import ray.tune.registry
|
||||
from ray.tune.result import (DEFAULT_RESULTS_DIR, DONE, HOSTNAME, PID,
|
||||
TIME_TOTAL_S, TRAINING_ITERATION, TIMESTEPS_TOTAL)
|
||||
from ray.utils import random_string, binary_to_hex, hex_to_binary
|
||||
from ray.utils import _random_string, binary_to_hex, hex_to_binary
|
||||
|
||||
DEBUG_PRINT_INTERVAL = 5
|
||||
MAX_LEN_IDENTIFIER = 130
|
||||
@@ -311,7 +311,7 @@ class Trial(object):
|
||||
|
||||
@classmethod
|
||||
def generate_id(cls):
|
||||
return binary_to_hex(random_string())[:8]
|
||||
return binary_to_hex(_random_string())[:8]
|
||||
|
||||
def init_logger(self):
|
||||
"""Init logger."""
|
||||
|
||||
@@ -38,7 +38,7 @@ from ray import ObjectID, DriverID, ActorID, ActorHandleID, ClientID, TaskID
|
||||
from ray import profiling
|
||||
from ray.function_manager import (FunctionActorManager, FunctionDescriptor)
|
||||
import ray.parameter
|
||||
from ray.utils import (check_oversized_pickle, is_cython, random_string,
|
||||
from ray.utils import (check_oversized_pickle, is_cython, _random_string,
|
||||
thread_safe_client, setup_logger)
|
||||
|
||||
SCRIPT_MODE = 0
|
||||
@@ -186,7 +186,7 @@ class Worker(object):
|
||||
# to the current task ID may not be correct. Generate a
|
||||
# random task ID so that the backend can differentiate
|
||||
# between different threads.
|
||||
self._task_context.current_task_id = TaskID(random_string())
|
||||
self._task_context.current_task_id = TaskID(_random_string())
|
||||
if getattr(self, '_multithreading_warned', False) is not True:
|
||||
logger.warning(
|
||||
"Calling ray.get or ray.wait in a separate thread "
|
||||
@@ -1753,13 +1753,13 @@ def connect(info,
|
||||
|
||||
# Initialize some fields.
|
||||
if mode is WORKER_MODE:
|
||||
worker.worker_id = random_string()
|
||||
worker.worker_id = _random_string()
|
||||
if setproctitle:
|
||||
setproctitle.setproctitle("ray_worker")
|
||||
else:
|
||||
# This is the code path of driver mode.
|
||||
if driver_id is None:
|
||||
driver_id = DriverID(random_string())
|
||||
driver_id = DriverID(_random_string())
|
||||
|
||||
if not isinstance(driver_id, DriverID):
|
||||
raise Exception("The type of given driver id must be DriverID.")
|
||||
@@ -1911,7 +1911,7 @@ def connect(info,
|
||||
function_descriptor.get_function_descriptor_list(),
|
||||
[], # arguments.
|
||||
0, # num_returns.
|
||||
TaskID(random_string()), # parent_task_id.
|
||||
TaskID(_random_string()), # parent_task_id.
|
||||
0, # parent_counter.
|
||||
ActorID.nil(), # actor_creation_id.
|
||||
ObjectID.nil(), # actor_creation_dummy_object_id.
|
||||
@@ -2164,7 +2164,7 @@ def register_custom_serializer(cls,
|
||||
else:
|
||||
# In this case, the class ID only needs to be meaningful on this
|
||||
# worker and not across workers.
|
||||
class_id = random_string()
|
||||
class_id = _random_string()
|
||||
|
||||
# Make sure class_id is a string.
|
||||
class_id = ray.utils.binary_to_hex(class_id)
|
||||
|
||||
Reference in New Issue
Block a user