Skip to content

Commit

Permalink
add TODO statements
Browse files Browse the repository at this point in the history
  • Loading branch information
dsikka committed Sep 14, 2023
1 parent dff4c84 commit 115a7d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/deepsparse/transformers/pipelines/text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class GeneratedText(BaseModel):
)


# TODO: Pydantic aliases allow assignment but not reference. Still need to update.
class TextGenerationOutput(BaseModel):
created: datetime.datetime = Field(description="Time of inference creation.")
prompts: Union[str, List[str]] = Field(
Expand Down Expand Up @@ -609,6 +610,7 @@ def engine_forward(
finished_reason.append(FinishReason.STOP)
break

# TODO: Add any generic callback reason?
if callback is not None and callback(token) is False:
_LOGGER.debug(
"callback %s returned False, stopping generation."
Expand Down

0 comments on commit 115a7d7

Please sign in to comment.