Skip to content

Commit c01e64a

Browse files
committed
Adjusted annotations of test_yuanrong_storage_client_e2e.py
Signed-off-by: dpj135 <958208521@qq.com>
1 parent f26677a commit c01e64a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_yuanrong_storage_client_e2e.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727

2828
# --- Mock Backend Implementation ---
29-
29+
# In real scenarios, multiple DsTensorClients or KVClients share storage.
30+
# Here, each mockClient is implemented with independent storage using a simple dictionary,
31+
# and is only suitable for unit testing.
3032

3133
class MockDsTensorClient:
3234
def __init__(self, host, port, device_id):
@@ -38,13 +40,13 @@ def init(self):
3840
def dev_mset(self, keys, values):
3941
for k, v in zip(keys, values, strict=True):
4042
assert v.device.type == "npu"
41-
self.storage[k] = v.clone()
43+
self.storage[k] = v
4244

4345
def dev_mget(self, keys, out_tensors):
4446
for i, k in enumerate(keys):
47+
# Note: If key is missing, tensor remains unchanged (mock limitation)
4548
if k in self.storage:
4649
out_tensors[i].copy_(self.storage[k])
47-
# Note: If key is missing, tensor remains unchanged (mock limitation)
4850

4951
def dev_delete(self, keys):
5052
for k in keys:

0 commit comments

Comments
 (0)