Skip to content

Commit 6e663d3

Browse files
committed
update api name
1 parent f8e61af commit 6e663d3

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

ucm/store/cache/connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def dump(
105105
task_id = self.store.Dump(ids, indexes, addrs)
106106
return CacheTransTask(task_id)
107107

108-
def fetch_data(
108+
def load_data(
109109
self,
110110
block_ids: List[bytes],
111111
shard_index: List[int],

ucm/store/posix/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def dump(
104104
task_id = self.store.Dump(ids, indexes, addrs)
105105
return PosixTransTask(task_id)
106106

107-
def fetch_data(
107+
def load_data(
108108
self,
109109
block_ids: List[bytes],
110110
shard_index: List[int],
@@ -162,5 +162,5 @@ def check(self, task: Task) -> bool:
162162
founds = store.lookup(block_ids)
163163
assert all(founds)
164164
data2 = [[cupy.cuda.alloc_pinned_memory(block_size).ptr] for _ in range(block_num)]
165-
handle = store.fetch_data(block_ids, shard_idxes, data2)
165+
handle = store.load_data(block_ids, shard_idxes, data2)
166166
store.wait(handle)

ucm/store/test/e2e/cache_on_posix_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
# SOFTWARE.
2424
#
25-
from abc import ABC
2625
import os
2726
import secrets
2827
import time
28+
from abc import ABC
2929
from typing import List
3030

3131
import cupy
@@ -88,13 +88,13 @@ def dump(
8888
) -> Task:
8989
return self.cache.dump(block_ids, shard_index, src_tensor)
9090

91-
def fetch_data(
91+
def load_data(
9292
self,
9393
block_ids: List[bytes],
9494
shard_index: List[int],
9595
dst_addr: List[List[int]],
9696
) -> Task:
97-
return self.cache.fetch_data(block_ids, shard_index, dst_addr)
97+
return self.cache.load_data(block_ids, shard_index, dst_addr)
9898

9999
def dump_data(
100100
self,
@@ -141,7 +141,7 @@ def main():
141141
]
142142
founds = store.lookup(chunk_block_ids)
143143
assert all(founds)
144-
task = store.fetch_data(chunk_block_ids, shard_indexes, dst_addrs)
144+
task = store.load_data(chunk_block_ids, shard_indexes, dst_addrs)
145145
store.wait(task)
146146

147147

ucm/store/ucmstore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def dump(
126126
pass
127127

128128
@abstractmethod
129-
def fetch_data(
129+
def load_data(
130130
self,
131131
block_ids: List[bytes],
132132
shard_index: List[int],
@@ -169,7 +169,7 @@ def wait(self, task: Task) -> None:
169169
"""Block until the given transfer task completes.
170170
171171
Args:
172-
task: Task handle returned by ``load``, ``dump``, ``fetch_data``,
172+
task: Task handle returned by ``load``, ``dump``, ``load_data``,
173173
or ``dump_data``.
174174
"""
175175
pass

0 commit comments

Comments
 (0)