You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Upsert` inserts `key` if it does not exist and updates the existing object if
122
+
it does. It uses the same replication configuration model as `Put`, while
123
+
allowing the store to reuse existing placement for in-place updates when the
124
+
current layout permits it. `BatchUpsert` performs the same operation for
125
+
multiple keys using a shared replication configuration.
126
+
108
127
### Remove
109
128
110
129
```C++
@@ -516,6 +535,40 @@ The Master Service handles object-related interfaces as follows:
516
535
517
536
Before writing an object, the Client calls PutStart to request storage space allocation from the Master Service. After completing data writing, the Client calls PutEnd to notify the Master Service to mark the object write as completed.
Copy file name to clipboardExpand all lines: docs/source/python-api-reference/mooncake-store.md
+241Lines changed: 241 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -629,6 +629,120 @@ result = store.put_batch(keys, values)
629
629
630
630
---
631
631
632
+
#### upsert()
633
+
634
+
Insert a new objectif the key does not exist, or update the existing objectin place when possible. They use the same replication configuration model as`put()`.
Insert a tensor if its key is missing, or update the existing tensor if the key already exists. The current tensor upsert helpers use the default `ReplicateConfig`and therefore do not take a `config` parameter.
-`List[int]`: List of status codes for each tensor operation.
1772
+
1773
+
**Note:** This function requires `torch` to be installed and available in the environment. Not supported for dummy client.
1774
+
1775
+
---
1776
+
1536
1777
### PyTorch Tensor Operations (Zero Copy)
1537
1778
1538
1779
These methods provide direct support for storing and retrieving PyTorch tensors. They automatically handle serialization and metadata, and include built-in support for**Tensor Parallelism (TP)** by automatically splitting and reconstructing tensor shards.
0 commit comments