mirror of
https://github.com/wassname/ray.git
synced 2026-07-16 11:21:10 +08:00
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:
@@ -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():
|
||||
|
||||
@@ -16,7 +16,7 @@ def get_ray_result(cython_func, *args):
|
||||
|
||||
class CythonTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
ray.init()
|
||||
ray.init(object_store_memory=int(10**8))
|
||||
|
||||
def tearDown(self):
|
||||
ray.shutdown()
|
||||
|
||||
@@ -13,7 +13,7 @@ from ray.tests.cluster_utils import Cluster
|
||||
import ray.ray_constants as ray_constants
|
||||
|
||||
|
||||
@pytest.fixture(params=[1, 20])
|
||||
@pytest.fixture(params=[1, 4])
|
||||
def ray_start_sharded(request):
|
||||
num_redis_shards = request.param
|
||||
|
||||
@@ -24,7 +24,10 @@ def ray_start_sharded(request):
|
||||
|
||||
# Start the Ray processes.
|
||||
ray.init(
|
||||
num_cpus=10, num_redis_shards=num_redis_shards, redis_max_memory=10**7)
|
||||
object_store_memory=int(0.1 * 10**9),
|
||||
num_cpus=10,
|
||||
num_redis_shards=num_redis_shards,
|
||||
redis_max_memory=10**7)
|
||||
|
||||
yield None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user