MCPcopy Create free account
hub / github.com/EverMind-AI/MSA / record_kwargs

Method record_kwargs

src/utils/cache.py:186–197  ·  view source on GitHub ↗

记录层的元数据信息 Args: layer_idx: 层索引 kwargs: 包含路由层信息的字典

(self, layer_idx, kwargs)

Source from the content-addressed store, hash-verified

184 self.meta = {}
185
186 def record_kwargs(self, layer_idx, kwargs):
187 """
188 记录层的元数据信息
189
190 Args:
191 layer_idx: 层索引
192 kwargs: 包含路由层信息的字典
193 """
194 if layer_idx in self.cache_kwargs:
195 self.cache_kwargs[layer_idx].update(kwargs)
196 else:
197 self.cache_kwargs[layer_idx] = kwargs
198
199 def get_layer_length(self):
200 return len(self.cache_kwargs)

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected