From 54487b1d7fd99187cef2e47cc84f702b7916b5db Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Wed, 11 Jul 2018 20:34:19 -0500 Subject: [PATCH] Pin the number of CPUs in failing actor test. (#2368) * Pin the number of CPUs in failing actor test. * Pin number of CPUs in multi_node_test.py. * Fix linting. --- test/actor_test.py | 2 +- test/multi_node_test.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/actor_test.py b/test/actor_test.py index f0ba7c515..2832385e4 100644 --- a/test/actor_test.py +++ b/test/actor_test.py @@ -484,7 +484,7 @@ class ActorNesting(unittest.TestCase): def testRemoteFunctionWithinActor(self): # Make sure we can use remote funtions within actors. - ray.init(num_cpus=100) + ray.init(num_cpus=10) # Create some values to close over. val1 = 1 diff --git a/test/multi_node_test.py b/test/multi_node_test.py index db9c76218..4cf38ebdc 100644 --- a/test/multi_node_test.py +++ b/test/multi_node_test.py @@ -223,7 +223,7 @@ class StartRayScriptTest(unittest.TestCase): subprocess.Popen(["ray", "stop"]).wait() # Test starting Ray with the number of CPUs specified. - run_and_get_output(["ray", "start", "--head", "--num-cpus", "100"]) + run_and_get_output(["ray", "start", "--head", "--num-cpus", "2"]) subprocess.Popen(["ray", "stop"]).wait() # Test starting Ray with the number of GPUs specified. @@ -245,11 +245,11 @@ class StartRayScriptTest(unittest.TestCase): # Test starting Ray with all arguments specified. run_and_get_output([ - "ray", "start", "--head", "--num-workers", "20", - "--redis-port", "6379", "--redis-shard-ports", - "6380,6381,6382", "--object-manager-port", "12345", - "--num-cpus", "100", "--num-gpus", "0", "--redis-max-clients", - "100", "--resources", "{\"Custom\": 1}" + "ray", "start", "--head", "--num-workers", "2", "--redis-port", + "6379", "--redis-shard-ports", "6380,6381,6382", + "--object-manager-port", "12345", "--num-cpus", "2", + "--num-gpus", "0", "--redis-max-clients", "100", "--resources", + "{\"Custom\": 1}" ]) subprocess.Popen(["ray", "stop"]).wait()