mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-24 09:44:10 +08:00
* [Feature] support v1 update/clear api for RL * [fix] fix stale control responses when control method timed out * [chore] remove unused code * [chore] optimize tags and key_prefix * [test] fix ci * [chore] fix code style * [fix] fix ep control * [fix] fix ep control for engine cache queue
This commit is contained in:
@@ -87,15 +87,19 @@ class TestCacheTransferManager(unittest.TestCase):
|
||||
# --------------------------
|
||||
# mock IPCSignal
|
||||
# --------------------------
|
||||
patcher2 = patch("fastdeploy.cache_manager.cache_transfer_manager.IPCSignal", new=MagicMock())
|
||||
class DummyIPCSignal:
|
||||
def __init__(self, name, array, dtype, suffix, create=False):
|
||||
self.value = array
|
||||
|
||||
patcher2 = patch("fastdeploy.cache_manager.cache_transfer_manager.IPCSignal", new=DummyIPCSignal)
|
||||
patcher2.start()
|
||||
self.addCleanup(patcher2.stop)
|
||||
|
||||
# --------------------------
|
||||
# mock _init_cpu_cache 和 _init_gpu_cache
|
||||
# --------------------------
|
||||
patcher3 = patch.object(CacheTransferManager, "_init_cpu_cache", lambda self, args: None)
|
||||
patcher4 = patch.object(CacheTransferManager, "_init_gpu_cache", lambda self, args: None)
|
||||
patcher3 = patch.object(CacheTransferManager, "_init_cpu_cache", lambda self: None)
|
||||
patcher4 = patch.object(CacheTransferManager, "_init_gpu_cache", lambda self: None)
|
||||
patcher3.start()
|
||||
patcher4.start()
|
||||
self.addCleanup(patcher3.stop)
|
||||
|
||||
Reference in New Issue
Block a user