mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 05:16:30 +08:00
Start moving ray internal files to _private module (#10994)
This commit is contained in:
@@ -545,7 +545,7 @@ def test_invalid_unicode_in_worker_log(shutdown_only):
|
||||
time.sleep(1.0)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="This test is too expensive to run.")
|
||||
@@ -580,7 +580,7 @@ def test_move_log_files_to_old(shutdown_only):
|
||||
break
|
||||
|
||||
# Make sure that nothing has died.
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
def test_lease_request_leak(shutdown_only):
|
||||
|
||||
@@ -11,7 +11,7 @@ import sys
|
||||
from jsonschema.exceptions import ValidationError
|
||||
|
||||
import ray
|
||||
import ray.services as services
|
||||
import ray._private.services as services
|
||||
from ray.autoscaler._private.util import prepare_config, validate_config
|
||||
from ray.autoscaler._private.commands import get_or_create_head_node
|
||||
from ray.autoscaler._private.docker import DOCKER_MOUNT_PREFIX
|
||||
|
||||
@@ -630,7 +630,7 @@ def test_get_correct_node_ip():
|
||||
node_mock = MagicMock()
|
||||
node_mock.node_ip_address = "10.0.0.111"
|
||||
worker_mock._global_node = node_mock
|
||||
found_ip = ray.services.get_node_ip_address()
|
||||
found_ip = ray._private.services.get_node_ip_address()
|
||||
assert found_ip == "10.0.0.111"
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ def test_dying_worker_get(ray_start_2_cpus):
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
# This test checks that when a driver dies in the middle of a get, the plasma
|
||||
@@ -98,7 +98,7 @@ ray.get(ray.ObjectRef(ray.utils.hex_to_binary("{}")))
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
# This test checks that when a worker dies in the middle of a wait, the plasma
|
||||
@@ -136,7 +136,7 @@ def test_dying_worker_wait(ray_start_2_cpus):
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
# This test checks that when a driver dies in the middle of a wait, the plasma
|
||||
@@ -177,7 +177,7 @@ ray.wait([ray.ObjectRef(ray.utils.hex_to_binary("{}"))])
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -87,7 +87,7 @@ def test_failed_task(ray_start_regular, error_pubsub):
|
||||
def test_push_error_to_driver_through_redis(ray_start_regular, error_pubsub):
|
||||
address_info = ray_start_regular
|
||||
address = address_info["redis_address"]
|
||||
redis_client = ray.services.create_redis_client(
|
||||
redis_client = ray._private.services.create_redis_client(
|
||||
address, password=ray.ray_constants.REDIS_DEFAULT_PASSWORD)
|
||||
error_message = "Test error message"
|
||||
ray.utils.push_error_to_driver_through_redis(
|
||||
|
||||
@@ -142,7 +142,7 @@ def test_load_report(shutdown_only, max_shapes):
|
||||
_system_config={
|
||||
"max_resource_shapes_per_load_report": max_shapes,
|
||||
})
|
||||
redis = ray.services.create_redis_client(
|
||||
redis = ray._private.services.create_redis_client(
|
||||
cluster["redis_address"],
|
||||
password=ray.ray_constants.REDIS_DEFAULT_PASSWORD)
|
||||
client = redis.pubsub(ignore_subscribe_messages=True)
|
||||
|
||||
@@ -34,7 +34,7 @@ def test_submitting_many_tasks(ray_start_sharded):
|
||||
return x
|
||||
|
||||
ray.get([g(100) for _ in range(100)])
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
def test_submitting_many_actors_to_one(ray_start_sharded):
|
||||
@@ -72,7 +72,7 @@ def test_getting_and_putting(ray_start_sharded):
|
||||
for _ in range(1000):
|
||||
ray.get(x_id)
|
||||
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
def test_getting_many_objects(ray_start_sharded):
|
||||
@@ -84,7 +84,7 @@ def test_getting_many_objects(ray_start_sharded):
|
||||
lst = ray.get([f.remote() for _ in range(n)])
|
||||
assert lst == n * [1]
|
||||
|
||||
assert ray.services.remaining_processes_alive()
|
||||
assert ray._private.services.remaining_processes_alive()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user