Compare commits

...

2 Commits

Author SHA1 Message Date
3d40c834f0 v0.2.1.post1 2023-10-17 16:30:46 +00:00
d0fb047de3 [BugFix] Define __eq__ in SequenceGroupOutputs (#1389) 2023-10-17 08:35:27 +00:00
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@ from vllm.entrypoints.llm import LLM
from vllm.outputs import CompletionOutput, RequestOutput from vllm.outputs import CompletionOutput, RequestOutput
from vllm.sampling_params import SamplingParams from vllm.sampling_params import SamplingParams
__version__ = "0.2.1" __version__ = "0.2.1.post1"
__all__ = [ __all__ = [
"LLM", "LLM",

View File

@ -401,6 +401,12 @@ class SequenceGroupOutputs:
return (f"SequenceGroupOutputs(samples={self.samples}, " return (f"SequenceGroupOutputs(samples={self.samples}, "
f"prompt_logprobs={self.prompt_logprobs})") f"prompt_logprobs={self.prompt_logprobs})")
def __eq__(self, other: object) -> bool:
if not isinstance(other, SequenceGroupOutputs):
raise NotImplementedError()
return (self.samples == other.samples
and self.prompt_logprobs == other.prompt_logprobs)
# For each sequence group, we generate a list of SequenceOutputs object, # For each sequence group, we generate a list of SequenceOutputs object,
# each of which contains one possible candidate for the next token. # each of which contains one possible candidate for the next token.