-
Notifications
You must be signed in to change notification settings - Fork 310
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
[flyte deck] Streaming Decks #2779
Conversation
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2779 +/- ##
===========================================
+ Coverage 77.90% 90.50% +12.60%
===========================================
Files 217 108 -109
Lines 22178 4760 -17418
Branches 2768 0 -2768
===========================================
- Hits 17277 4308 -12969
+ Misses 4115 452 -3663
+ Partials 786 0 -786 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
I would love to see an example of tqdm |
replaces #1704 |
will try it, just let me ship the MSGPACK IDL first. |
flytekit/deck/deck.py
Outdated
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make it automatically refresh the page.. probably need that on the empty deck but not sure how to do the realtime behavior once it has content (you don't want to refresh while the user is browsing around or clicking through various tabs)
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="refresh" content="5" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COOL, will try it, thank you
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool. It unlocks so many use cases!
I left just a couple of comments. We're very close.
.. warning:: | ||
|
||
This feature is in beta. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice.
flytekit/deck/deck.py
Outdated
task_name = params.task_id.name | ||
|
||
if not params.has_attr(ENABLE_DECK) or not params.enable_deck: | ||
logger.warning("Deck is disabled for this task, please don't call Deck.publish()") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this error message less charged. How about we say "Call to Deck.publish() will not generate flyte decks as enable_deck=False
"?
flytekit/core/base_task.py
Outdated
if DeckField.TIMELINE.value in self.deck_fields and ctx.user_space_params is not None: | ||
ctx.user_space_params.decks.append(ctx.user_space_params.timeline_deck) | ||
if self.enable_deck and ctx.user_space_params is not None: | ||
ctx.user_space_params.builder().add_attr(ENABLE_DECK, True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because when disable deck
, we shouldn't append deck.
there's something going on with the serialization tests (e.g.: https://github.com/flyteorg/flytekit/actions/runs/13126446467/job/36627463041?pr=2779). Can you take a look? |
yes no problem |
Signed-off-by: Future-Outlier <[email protected]>
Code Review Agent Run #1c8466Actionable Suggestions - 0Review Details
|
Signed-off-by: Future-Outlier <[email protected]>
Code Review Agent Run #4926beActionable Suggestions - 0Review Details
|
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Code Review Agent Run #bb9139Actionable Suggestions - 4
Review Details
|
…rotobufs Signed-off-by: Eduardo Apolinario <[email protected]>
Code Review Agent Run #c1727cActionable Suggestions - 1
Review Details
|
Signed-off-by: Future-Outlier <[email protected]> Co-authored-by: pingsutw <[email protected]>
Code Review Agent Run #a1d78eActionable Suggestions - 0Review Details
|
* [Flyte Decl] Streaming Decks Signed-off-by: Future-Outlier <[email protected]> * print Signed-off-by: Future-Outlier <[email protected]> * sleep more Signed-off-by: Future-Outlier <[email protected]> * add dummy deck Signed-off-by: Future-Outlier <[email protected]> * nit Signed-off-by: Future-Outlier <[email protected]> * dummy deck Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * nit Signed-off-by: Future-Outlier <[email protected]> * test Signed-off-by: Future-Outlier <[email protected]> * return html Signed-off-by: Future-Outlier <[email protected]> * Change Deck Signed-off-by: Future-Outlier <[email protected]> * fix Signed-off-by: Future-Outlier <[email protected]> * fix recursion error Signed-off-by: Future-Outlier <[email protected]> * remove redundant code Signed-off-by: Future-Outlier <[email protected]> * add dummy deck to deck init Signed-off-by: Future-Outlier <[email protected]> * Better Dummy Deck Logic Signed-off-by: Future-Outlier <[email protected]> * Deck Publish Signed-off-by: Future-Outlier <[email protected]> * litn Signed-off-by: Future-Outlier <[email protected]> * remove dummy deck Signed-off-by: Future-Outlier <[email protected]> * nit Signed-off-by: Future-Outlier <[email protected]> * use auto refresh tab, 5 seconds as interval Signed-off-by: Future-Outlier <[email protected]> * revert Signed-off-by: Future-Outlier <[email protected]> * test setDynamicTabs Signed-off-by: Future-Outlier <[email protected]> * change interval time Signed-off-by: Future-Outlier <[email protected]> * test Signed-off-by: Future-Outlier <[email protected]> * revert Signed-off-by: Future-Outlier <[email protected]> * test Signed-off-by: Future-Outlier <[email protected]> * nit Signed-off-by: Future-Outlier <[email protected]> * try dynamic containers Signed-off-by: Future-Outlier <[email protected]> * try dynamic containers v2 Signed-off-by: Future-Outlier <[email protected]> * try dynamic containers v3 Signed-off-by: Future-Outlier <[email protected]> * debug Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * nit Signed-off-by: Future-Outlier <[email protected]> * Refresh Botton Signed-off-by: Future-Outlier <[email protected]> * fix Signed-off-by: Future-Outlier <[email protected]> * lint Signed-off-by: Future-Outlier <[email protected]> * test new refresh Signed-off-by: Future-Outlier <[email protected]> * lint Signed-off-by: Future-Outlier <[email protected]> * Revert back html code, collaborating with Lyon Signed-off-by: Future-Outlier <[email protected]> * lint Signed-off-by: Future-Outlier <[email protected]> * nit Signed-off-by: Future-Outlier <[email protected]> * nit Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * better code Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * some notes for giving user params builder deck enabled Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * raise error when disabled deck and called Deck.publish() Signed-off-by: Future-Outlier <[email protected]> * lint Signed-off-by: Future-Outlier <[email protected]> * lint Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * static method by YEE Signed-off-by: Future-Outlier <[email protected]> * make Deck.publish more like a wrapper by moving enable deck checking to _output_deck Signed-off-by: Future-Outlier <[email protected]> * lint Signed-off-by: Future-Outlier <[email protected]> * print monodocs err Signed-off-by: Future-Outlier <[email protected]> * Fix monodocs Signed-off-by: Future-Outlier <[email protected]> * use builder Signed-off-by: Future-Outlier <[email protected]> * add translator test for deck serialization settings Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * fix Signed-off-by: Future-Outlier <[email protected]> * test Signed-off-by: Future-Outlier <[email protected]> * update Signed-off-by: Future-Outlier <[email protected]> * remove blank Signed-off-by: Future-Outlier <[email protected]> * update kevin's advice Signed-off-by: Future-Outlier <[email protected]> Co-authored-by: pingsutw <[email protected]> * master-branch-idl Signed-off-by: Future-Outlier <[email protected]> --------- Signed-off-by: Future-Outlier <[email protected]> Co-authored-by: pingsutw <[email protected]> Signed-off-by: Umer Ahmad <[email protected]>
Tracking issue
flyteorg/flyte#5574
Why are the changes needed?
we want to support streaming decks.
What changes were proposed in this pull request?
add a function
publish
for the Flyte Deck.How was this patch tested?
Setup process
single binary.
flyte: flyteorg/flyte#6053
flytekit: #2779
flyteconsole: flyteorg/flyteconsole#890
Screenshots
flytekit: this branch
NEW FLYTEKIT, NO DECK, RUNNING With Deck, SUCCEED, and FAILED
OSS-STREAMING-DECK-small.mov
OLD FLYTEKIT, NO DECK, RUNNING With Deck, SUCCEED, and FAILED
OSS-STREAMING-DECK-OLD-FLYTEKIT-small.mov
Check all the applicable boxes
Related PRs
Docs link
Summary by Bito
Implements comprehensive deck functionality improvements including Deck.publish() method and generates_deck flag handling, with enhanced error messaging. Added task name context to warning messages when enable_deck is False for clearer feedback. Refactors Protocol Buffer BoolValue wrapper from base task to models layer, improving error handling and attribute validation. Changes simplify task definition interface while maintaining proper protobuf serialization.Unit tests added: True
Estimated effort to review (1-5, lower is better): 3