Pipe num_cpus and num_gpus through from start_ray.py. (#275)

* Pipe num_cpus and num_gpus through from start_ray.py.

* Improve load balancing tests.

* Fix bug.

* Factor out some testing code.
This commit is contained in:
Robert Nishihara
2017-02-13 17:43:23 -08:00
committed by Philipp Moritz
parent 3934d5f6eb
commit 072eadd57f
6 changed files with 63 additions and 48 deletions
+13 -1
View File
@@ -127,11 +127,23 @@ class StartRayScriptTest(unittest.TestCase):
"--object-manager-port", "12345"])
subprocess.Popen([stop_ray_script]).wait()
# Test starting Ray with the number of CPUs specified.
subprocess.check_output([start_ray_script, "--head",
"--num-cpus", "100"])
subprocess.Popen([stop_ray_script]).wait()
# Test starting Ray with the number of GPUs specified.
subprocess.check_output([start_ray_script, "--head",
"--num-gpus", "100"])
subprocess.Popen([stop_ray_script]).wait()
# Test starting Ray with all arguments specified.
subprocess.check_output([start_ray_script, "--head",
"--num-workers", "20",
"--redis-port", "6379",
"--object-manager-port", "12345"])
"--object-manager-port", "12345",
"--num-cpus", "100",
"--num-gpus", "0"])
subprocess.Popen([stop_ray_script]).wait()
# Test starting Ray with invalid arguments.