mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 01:59:23 +08:00
[Core] put small objects in memory store (#8972)
* remove the put in memory store * put small objects directly in memory store * cast data type * fix another place that uses Put to spill to plasma store * fix multiple tests related to memory limits * partially fix test_metrics * remove not functioning codes * fix core_worker_test * refactor put to plasma codes * add a flag for the new feature * add flag to more places * do a warmup round for the plasma store * lint * lint again * fix warmup store * Update _raylet.pyx Co-authored-by: Eric Liang <ekhliang@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import os
|
||||
import signal
|
||||
import sys
|
||||
import time
|
||||
import numpy as np
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -54,7 +55,8 @@ def test_dying_worker_get(ray_start_2_cpus):
|
||||
assert len(ready_ids) == 0
|
||||
# Seal the object so the store attempts to notify the worker that the
|
||||
# get has been fulfilled.
|
||||
ray.worker.global_worker.put_object(1, x_id)
|
||||
obj = np.ones(200 * 1024, dtype=np.uint8)
|
||||
ray.worker.global_worker.put_object(obj, x_id)
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
@@ -97,7 +99,8 @@ ray.get(ray.ObjectID(ray.utils.hex_to_binary("{}")))
|
||||
assert len(ready_ids) == 0
|
||||
# Seal the object so the store attempts to notify the worker that the
|
||||
# get has been fulfilled.
|
||||
ray.worker.global_worker.put_object(1, x_id)
|
||||
obj = np.ones(200 * 1024, dtype=np.uint8)
|
||||
ray.worker.global_worker.put_object(obj, x_id)
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
@@ -137,7 +140,8 @@ def test_dying_worker_wait(ray_start_2_cpus):
|
||||
time.sleep(0.1)
|
||||
|
||||
# Create the object.
|
||||
ray.worker.global_worker.put_object(1, x_id)
|
||||
obj = np.ones(200 * 1024, dtype=np.uint8)
|
||||
ray.worker.global_worker.put_object(obj, x_id)
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
@@ -180,7 +184,8 @@ ray.wait([ray.ObjectID(ray.utils.hex_to_binary("{}"))])
|
||||
assert len(ready_ids) == 0
|
||||
# Seal the object so the store attempts to notify the worker that the
|
||||
# wait can return.
|
||||
ray.worker.global_worker.put_object(1, x_id)
|
||||
obj = np.ones(200 * 1024, dtype=np.uint8)
|
||||
ray.worker.global_worker.put_object(obj, x_id)
|
||||
time.sleep(0.1)
|
||||
|
||||
# Make sure that nothing has died.
|
||||
|
||||
Reference in New Issue
Block a user