By default, start a number of workers equal to the number of CPUs. (#430)

* By default, start a number of workers equal to the number of CPUs.

* Fix stress tests.
This commit is contained in:
Robert Nishihara
2017-04-06 00:02:58 -07:00
committed by Philipp Moritz
parent fa363a5a3a
commit 320109a5bd
7 changed files with 33 additions and 33 deletions
+6
View File
@@ -35,6 +35,12 @@ If there are GPUs available on the machine, you should specify this with the
By default, Ray will use ``psutil.cpu_count()`` to determine the number of CPUs,
and by default the number of GPUs will be zero.
Instead of thinking about the number of "worker" processes on each node, we
prefer to think in terms of the quantities of CPU and GPU resources on each
node and to provide the illusion of an infinite pool of workers. Tasks will be
assigned to workers based on the availability of resources so as to avoid
contention and not based on the number of available worker processes.
Connecting to an existing cluster
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1 -1
View File
@@ -87,7 +87,7 @@ This can be addressed by calling ``ray.register_class(Foo)``.
import ray
ray.init(num_workers=10)
ray.init()
# Define a custom class.
class Foo(object):