mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
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:
committed by
Philipp Moritz
parent
fa363a5a3a
commit
320109a5bd
@@ -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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user