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

PC-1044 Streaming runs #422

Merged
merged 27 commits into from
Mar 19, 2024
Merged

PC-1044 Streaming runs #422

merged 27 commits into from
Mar 19, 2024

Conversation

paulcjh
Copy link
Member

@paulcjh paulcjh commented Mar 11, 2024

Pull request outline

Checklist:

  • Docs updated
  • Tests written
  • Check for breaking changes in Resource
  • Version bumped

Added:

  • A list of new things

Changed:

  • A list of things changed

Removed:

  • A list of things removed

Related issues:

none


  • You can add a reference to an issue using hash followed by the issue number
  • If a checklist item is to be ignored it must be struck through

Copy link

linear bot commented Mar 11, 2024

PC-1044 Streaming runs

@paulcjh paulcjh changed the title Ph/pc 1044 streaming runs PC-1044 Streaming runs Mar 11, 2024
@paulcjh paulcjh marked this pull request as draft March 11, 2024 09:59
* stream post run query function

* add stream runio type + RunResult type

* track streaming indices and weather streaming required

* handle new streaming chunk

* integrate streaming into playground

* remove stray console logs

* frontend build
@rossgray
Copy link
Contributor

@paulcjh I wonder if we should make the streaming endpoint in the container a separate endpoint, as we're doing with the backend API, since previously we've tried to keep /v4/runs consistent between the container and pcore?

plutopulp and others added 4 commits March 12, 2024 15:04
* update stream function to accumulate chunks until valid json

* integrate image streaming into playground. Note this may break for other run types

* build frontend
* custom pipeline run output column with tooltip and dropdown streaming mode select

* integrate into playground

* frontend build
@rossgray
Copy link
Contributor

the only other thought I had (and maybe we can always do this later) was whether it makes sense to return the full run result schema every time, or just the raw outputs? Since I have a feeling all of the serialising JSON in and out of Pydantic objects may add a bit of overhead. We could always add a separate endpoint for that later though. Maybe also an endpoint where the results are streamed directly from the resource too without going via catalyst and pcore

adamleithp-mystic and others added 13 commits March 13, 2024 13:50
* made streaming mode dropdown styling a bit better

* added frontend build js
* unnest streamPostRun

* rudimentary implementation of chat interface with streaming

* add responseTime + fix localStorage saving

* refactor streaming index logic into hook

* fix undefined in new hook

* make chat both stream and non stream compatible

* build frontend
* fixes

* Making streaming response more robust

* Create helper function for handling stream responses

* Add async version of helper func

* Small tweaks

* improve error handling

* cleanup
* port over markdown component from dashboard

* render markdown in chat messages

* build frontend
* Move Stream class into diff module

* Move stream run into its own route

* cleanup

* blacken
@plutopulp plutopulp force-pushed the ph/pc-1044-streaming-runs branch 2 times, most recently from d4e2b29 to 131f593 Compare March 18, 2024 13:37
* Small refactor

* Add test

* Add pytest-asyncio dependency

* Fix ordering of outputs

* formatting

* fix formatting in other file
@rossgray rossgray marked this pull request as ready for review March 18, 2024 16:46
Copy link
Contributor

@plutopulp plutopulp left a comment

Choose a reason for hiding this comment

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

Nice to get this in! We've checked over this a fair few times but had a last look and LGTM

@rossgray rossgray merged commit ae200a1 into main Mar 19, 2024
5 checks passed
@rossgray rossgray deleted the ph/pc-1044-streaming-runs branch March 19, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants