mirror of
https://github.com/wassname/ray.git
synced 2026-07-20 12:40:20 +08:00
[Object Spilling] Remove LRU eviction (#13977)
* done. * formatting. * done. * done.
This commit is contained in:
@@ -32,10 +32,9 @@ def ray_init_with_task_retry_delay():
|
||||
@pytest.mark.parametrize(
|
||||
"ray_start_regular", [{
|
||||
"object_store_memory": 150 * 1024 * 1024,
|
||||
"_lru_evict": True,
|
||||
}],
|
||||
indirect=True)
|
||||
def test_actor_eviction(ray_start_regular):
|
||||
def test_actor_spilled(ray_start_regular):
|
||||
object_store_memory = 150 * 1024 * 1024
|
||||
|
||||
@ray.remote
|
||||
@@ -58,19 +57,14 @@ def test_actor_eviction(ray_start_regular):
|
||||
ray.get(obj)
|
||||
|
||||
# Get each object again. At this point, the earlier objects should have
|
||||
# been evicted.
|
||||
num_evicted, num_success = 0, 0
|
||||
# been spilled.
|
||||
num_success = 0
|
||||
for obj in objects:
|
||||
try:
|
||||
val = ray.get(obj)
|
||||
assert isinstance(val, np.ndarray), val
|
||||
num_success += 1
|
||||
except ray.exceptions.ObjectLostError:
|
||||
num_evicted += 1
|
||||
# Some objects should have been evicted, and some should still be in the
|
||||
# object store.
|
||||
assert num_evicted > 0
|
||||
assert num_success > 0
|
||||
val = ray.get(obj)
|
||||
assert isinstance(val, np.ndarray), val
|
||||
num_success += 1
|
||||
# All of objects should've been spilled, so all of them should succeed.
|
||||
assert num_success == len(objects)
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="Very flaky on Windows.")
|
||||
|
||||
Reference in New Issue
Block a user