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.
This commit is contained in:
Robert Nishihara 2018-07-11 20:34:19 -05:00 committed by Philipp Moritz
parent 4dadc60968
commit 54487b1d7f
2 changed files with 7 additions and 7 deletions

View file

@ -484,7 +484,7 @@ class ActorNesting(unittest.TestCase):
def testRemoteFunctionWithinActor(self): def testRemoteFunctionWithinActor(self):
# Make sure we can use remote funtions within actors. # 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. # Create some values to close over.
val1 = 1 val1 = 1

View file

@ -223,7 +223,7 @@ class StartRayScriptTest(unittest.TestCase):
subprocess.Popen(["ray", "stop"]).wait() subprocess.Popen(["ray", "stop"]).wait()
# Test starting Ray with the number of CPUs specified. # 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() subprocess.Popen(["ray", "stop"]).wait()
# Test starting Ray with the number of GPUs specified. # Test starting Ray with the number of GPUs specified.
@ -245,11 +245,11 @@ class StartRayScriptTest(unittest.TestCase):
# Test starting Ray with all arguments specified. # Test starting Ray with all arguments specified.
run_and_get_output([ run_and_get_output([
"ray", "start", "--head", "--num-workers", "20", "ray", "start", "--head", "--num-workers", "2", "--redis-port",
"--redis-port", "6379", "--redis-shard-ports", "6379", "--redis-shard-ports", "6380,6381,6382",
"6380,6381,6382", "--object-manager-port", "12345", "--object-manager-port", "12345", "--num-cpus", "2",
"--num-cpus", "100", "--num-gpus", "0", "--redis-max-clients", "--num-gpus", "0", "--redis-max-clients", "100", "--resources",
"100", "--resources", "{\"Custom\": 1}" "{\"Custom\": 1}"
]) ])
subprocess.Popen(["ray", "stop"]).wait() subprocess.Popen(["ray", "stop"]).wait()