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

Method pop

lmdeploy/pytorch/engine/mp_engine/base_worker.py:155–163  ·  view source on GitHub ↗
(self, stream_id, result)

Source from the content-addressed store, hash-verified

153 output.logprobs.extend(result.logprobs or [])
154
155 def pop(self, stream_id, result):
156 if not isinstance(result, EngineOutput):
157 return result
158 output = self._output.pop(stream_id, None)
159 if output is None:
160 return result
161 result.token_ids = output.token_ids or []
162 result.logprobs = output.logprobs or None
163 return result
164
165 def discard(self, stream_id):
166 """Discard gathered output for a stream."""

Callers 15

from_pretrainedMethod · 0.45
remove_sequenceMethod · 0.45
remove_sequenceMethod · 0.45
dropMethod · 0.45
config_from_pretrainedFunction · 0.45
update_stepMethod · 0.45
getMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected