The model output associated with a sequence group.
| 397 | |
| 398 | |
| 399 | class SequenceGroupOutput: |
| 400 | """The model output associated with a sequence group.""" |
| 401 | |
| 402 | def __init__( |
| 403 | self, |
| 404 | samples: List[SequenceOutput], |
| 405 | prompt_logprobs: Optional[PromptLogprobs], |
| 406 | ) -> None: |
| 407 | self.samples = samples |
| 408 | self.prompt_logprobs = prompt_logprobs |
| 409 | |
| 410 | def __repr__(self) -> str: |
| 411 | return (f"SequenceGroupOutput(samples={self.samples}, " |
| 412 | f"prompt_logprobs={self.prompt_logprobs})") |
| 413 | |
| 414 | def __eq__(self, other: object) -> bool: |
| 415 | if not isinstance(other, SequenceGroupOutput): |
| 416 | raise NotImplementedError() |
| 417 | return (self.samples == other.samples |
| 418 | and self.prompt_logprobs == other.prompt_logprobs) |
| 419 | |
| 420 | |
| 421 | # For each sequence group, we generate a list of SequenceOutput object, |
no outgoing calls
no test coverage detected