mirror of
https://github.com/wassname/ray.git
synced 2026-08-05 13:21:03 +08:00
Prevent actors from being placed on removed nodes or nodes with no CPUs. (#527)
* Make note about bug in which actor creation notification message is not received. * Prevent actors from being created on removed nodes. * Prevent actors from being created on nodes with no CPUs. * Fix linting. * Add test for scheduling actors on local schedulers with no CPUs. * Improve error message when actors created before ray.init called.
This commit is contained in:
committed by
Philipp Moritz
parent
c688a64235
commit
f32368bcbe
@@ -565,6 +565,19 @@ class ActorSchedulingProperties(unittest.TestCase):
|
||||
|
||||
class ActorsOnMultipleNodes(unittest.TestCase):
|
||||
|
||||
def testActorsOnNodesWithNoCPUs(self):
|
||||
ray.init(num_cpus=0)
|
||||
|
||||
@ray.actor
|
||||
class Foo(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
with self.assertRaises(Exception):
|
||||
Foo()
|
||||
|
||||
ray.worker.cleanup()
|
||||
|
||||
def testActorLoadBalancing(self):
|
||||
num_local_schedulers = 3
|
||||
ray.worker._init(start_ray_local=True, num_workers=0,
|
||||
|
||||
Reference in New Issue
Block a user