MCPcopy
hub / github.com/InternLM/lmdeploy / items

Method items

lmdeploy/turbomind/loader.py:31–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

29 self.pattern = pattern
30
31 def items(self):
32 for data in iter(self.que.get, None):
33 match = []
34 if self.pattern:
35 for k in data.keys():
36 match = re.findall(self.pattern, k)
37 break
38 if not match:
39 yield (-1, data)
40 else:
41 idx = int(match[0])
42 yield (idx, data)
43 torch.cuda.empty_cache()
44 self.que.task_done()
45
46 def all_items(self) -> dict:
47 raise NotImplementedError(

Callers 15

get_max_batch_sizeFunction · 0.80
serialize_state_dictFunction · 0.80
autoget_backend_configFunction · 0.80
check_vl_llmFunction · 0.80
get_model_archFunction · 0.80
search_nested_configFunction · 0.80
chat_templateMethod · 0.80
get_chat_templateFunction · 0.80
_set_funcFunction · 0.80
preprocessMethod · 0.80

Calls 1

keysMethod · 0.45