Add random actor placement; fix cancellation callback; update test skips (#11684)

This commit is contained in:
Eric Liang
2020-10-30 18:36:35 -07:00
committed by GitHub
parent b10871a1f5
commit 48dee789b3
14 changed files with 112 additions and 27 deletions
+4
View File
@@ -439,3 +439,7 @@ def format_web_url(url):
if not url.startswith("http://"):
return "http://" + url
return url
def new_scheduler_enabled():
return os.environ.get("RAY_ENABLE_NEW_SCHEDULER") == "1"
+6 -6
View File
@@ -11,7 +11,13 @@ SRCS = [] + select({
py_test_module_list(
files = [
"test_async.py",
"test_actor.py",
"test_actor_failures.py",
"test_actor_advanced.py",
"test_advanced.py",
"test_advanced_2.py",
"test_basic.py",
"test_basic_2.py",
"test_cli.py",
"test_component_failures_3.py",
"test_error_ray_not_initialized.py",
@@ -27,15 +33,9 @@ py_test_module_list(
py_test_module_list(
files = [
"test_actor_advanced.py",
"test_actor_failures.py",
"test_actor.py",
"test_actor_resources.py",
"test_advanced_2.py",
"test_advanced_3.py",
"test_advanced.py",
"test_array.py",
"test_basic_2.py",
"test_cancel.py",
"test_component_failures_2.py",
"test_dynres.py",
+3 -1
View File
@@ -12,7 +12,7 @@ import ray
import ray.test_utils
import ray.cluster_utils
from ray.test_utils import (run_string_as_driver, get_non_head_nodes,
wait_for_condition)
wait_for_condition, new_scheduler_enabled)
from ray.experimental.internal_kv import _internal_kv_get, _internal_kv_put
@@ -91,6 +91,7 @@ def test_actor_load_balancing(ray_start_cluster):
ray.get(results)
@pytest.mark.skipif(new_scheduler_enabled(), reason="multi node broken")
def test_actor_lifetime_load_balancing(ray_start_cluster):
cluster = ray_start_cluster
cluster.add_node(num_cpus=0)
@@ -943,6 +944,7 @@ def test_actor_creation_task_crash(ray_start_regular):
}
}],
indirect=True)
@pytest.mark.skipif(new_scheduler_enabled(), reason="todo hangs")
def test_pending_actor_removed_by_owner(ray_start_regular):
# Verify when an owner of pending actors is killed, the actor resources
# are correctly returned.
+3
View File
@@ -14,6 +14,7 @@ from ray.test_utils import (
wait_for_pid_to_exit,
generate_system_config_map,
get_other_nodes,
new_scheduler_enabled,
SignalActor,
)
@@ -265,6 +266,7 @@ def test_actor_restart_on_node_failure(ray_start_cluster):
assert result == 1 or result == results[-1] + 1
@pytest.mark.skipif(new_scheduler_enabled(), reason="dynamic resources todo")
def test_actor_restart_without_task(ray_start_regular):
"""Test a dead actor can be restarted without sending task to it."""
@@ -483,6 +485,7 @@ def test_decorated_method(ray_start_regular):
"num_cpus": 1,
"num_nodes": 3,
}], indirect=True)
@pytest.mark.skipif(new_scheduler_enabled(), reason="dynamic resources todo")
def test_ray_wait_dead_actor(ray_start_cluster):
"""Tests that methods completed by dead actors are returned as ready"""
cluster = ray_start_cluster
+2
View File
@@ -14,6 +14,7 @@ import ray.test_utils
from ray.test_utils import (
RayTestTimeoutException,
wait_for_condition,
new_scheduler_enabled,
)
logger = logging.getLogger(__name__)
@@ -251,6 +252,7 @@ def test_zero_cpus(shutdown_only):
ray.get(x)
@pytest.mark.skipif(new_scheduler_enabled(), reason="zero cpu handling")
def test_zero_cpus_actor(ray_start_cluster):
cluster = ray_start_cluster
cluster.add_node(num_cpus=0)