Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SHIP-834] [SHIP-818] Streaming Generators #548

Merged
merged 4 commits into from Sep 18, 2023
Merged

Conversation

dkolas
Copy link
Contributor

@dkolas dkolas commented Sep 11, 2023

This PR includes:

  • Streaming Generator interface
  • Additional methods and status on Block for streaming

Depends on: https://github.com/nludb/nludb/pull/631

(tests will fail until deploy of above)

@dkolas dkolas changed the title Streaming Generators [SHIP-834] [SHIP-818] Streaming Generators Sep 11, 2023
Copy link
Contributor

@eob eob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This is really exciting

class StreamState(str, Enum):
STARTED = "started" # A producer has begun streaming to this block.
COMPLETE = "complete" # The producer has finished streaming to this block successfully.
ABORTED = "aborted" # The producer finished streaming to the block, but there was an error.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think this is a huge deal, but if you wanted to align with the enums we use in the task system I think these would be: running, succeeded, failed

@@ -335,6 +344,24 @@ def as_llm_input(self, exclude_block_wrapper: Optional[bool] = False) -> str:
return f"{self.id}"
return f"Block({self.id})"

def finish_stream(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see you were aiming for alignment with these routes

@dkolas dkolas added this pull request to the merge queue Sep 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 15, 2023
@dkolas dkolas added this pull request to the merge queue Sep 18, 2023
Merged via the queue into main with commit b26291d Sep 18, 2023
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants