Add warning/error if object store memory exceeds available memory (#4893)

* exclude

* format

* add warning

* hatch

* reduce mem usage

* reduce object store mem

* set obj mem
This commit is contained in:
Eric Liang
2019-07-08 21:37:08 -07:00
committed by GitHub
parent dfc94ce7bc
commit 5aec750107
6 changed files with 73 additions and 10 deletions
+6 -2
View File
@@ -506,7 +506,11 @@ def test_resource_assignment(shutdown_only):
"""Test to make sure that we assign resource to actors at instantiation."""
# This test will create 16 actors. Declaring this many CPUs initially will
# speed up the test because the workers will be started ahead of time.
ray.init(num_cpus=16, num_gpus=1, resources={"Custom": 1})
ray.init(
num_cpus=16,
num_gpus=1,
resources={"Custom": 1},
object_store_memory=int(10**8))
class Actor(object):
def __init__(self):
@@ -1262,7 +1266,7 @@ def test_actors_and_tasks_with_gpus(ray_start_cluster):
def test_actors_and_tasks_with_gpus_version_two(shutdown_only):
# Create tasks and actors that both use GPUs and make sure that they
# are given different GPUs
ray.init(num_cpus=10, num_gpus=10)
ray.init(num_cpus=10, num_gpus=10, object_store_memory=int(10**8))
@ray.remote(num_gpus=1)
def f():