[wip][Flyte Deck] Streaming Decks
Tracking issue
https://github.com/flyteorg/flyte/issues/5574
Why are the changes needed?
What changes were proposed in this pull request?
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
- [ ] I updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [ ] All commits are signed-off.
Related PRs
Docs link
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.50%. Comparing base (
4cee7cd) to head (c0fd23a). Report is 4 commits behind head on master.
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I would love to see an example of tqdm
replaces https://github.com/flyteorg/flytekit/pull/1704
I would love to see an example of tqdm
will try it, just let me ship the MSGPACK IDL first.
New Demo Video (not included Flyte Console's change) cc @pingsutw @kumare3 @eapolinario @EngHabu
https://github.com/user-attachments/assets/ddf86143-b21a-49d5-b763-6012025b6324
Nice, I just would make a small refresh icon in grey next to the name, but all good
Nice, I just would make a small refresh icon in grey next to the name, but all good
okok, I will change this
this is the new video!!! https://drive.google.com/file/d/1TpTqMjWJURN7q35ZOB5rIkPQPkIztjCq/view?usp=sharing cc @kumare3 @pingsutw @eapolinario @EngHabu @wild-endeavor
@Future-Outlier this is excellent. Let's go
FYI @fg91 since you also want to use it. would love to get your feedback
FYI @fg91 since you also want to use it. would love to get your feedback
I'm a big fan of such a feature - being able to publish realtime updates from a task to flyte console was the topic of various discussions in the past (e.g. this or this):
# A very similar API was discussed back then:
deck = flytekit.Deck("Summary", ...)
deck.append(MarkdownRenderer.to_html(f"... {run.link} ..."))
deck.flush()
I have one question about the implementation. Does flytepropeller need to detect whenever the deck html in the bucket changed for the change to be reflected in the UI or does propeller only indicate to the task where to upload the deck to but a request from flyteconsole directly "goes to the bucket" without flytepropeller having to do further work?
FYI @fg91 since you also want to use it. would love to get your feedback
I'm a big fan of such a feature - being able to publish realtime updates from a task to flyte console was the topic of various discussions in the past (e.g. this or this):
# A very similar API was discussed back then: deck = flytekit.Deck("Summary", ...) deck.append(MarkdownRenderer.to_html(f"... {run.link} ...")) deck.flush()I have one question about the implementation. Does flytepropeller need to detect whenever the deck html in the bucket changed for the change to be reflected in the UI or does propeller only indicate to the task where to upload the deck to but a request from flyteconsole directly "goes to the bucket" without flytepropeller having to do further work?
I will reply this later, just finished an amazing solution about the backend with backward compatibility.
FYI @fg91 since you also want to use it. would love to get your feedback
I'm a big fan of such a feature - being able to publish realtime updates from a task to flyte console was the topic of various discussions in the past (e.g. this or this):
# A very similar API was discussed back then: deck = flytekit.Deck("Summary", ...) deck.append(MarkdownRenderer.to_html(f"... {run.link} ...")) deck.flush()I have one question about the implementation. Does flytepropeller need to detect whenever the deck html in the bucket changed for the change to be reflected in the UI or does propeller only indicate to the task where to upload the deck to but a request from flyteconsole directly "goes to the bucket" without flytepropeller having to do further work?
old flyte backend:
flyte-propeller called a head request to see if the deck exists or not.
new flyte backend:
flytepropeller check if we put FLYTE_ENABLE_DECK=true in the task template.
Code Review Agent Run #24744d
Actionable Suggestions - 2
-
flytekit/deck/deck.py - 1
- Consider using more specific exception type · Line 96-97
-
flytekit/core/base_task.py - 1
- Consider combining deck disable checks · Line 726-728
Additional Suggestions - 1
-
flytekit/core/context_manager.py - 1
- Consider adding type hints for attribute · Line 194-194
Review Details
-
Files reviewed - 7 · Commit Range:
01182b4..7bcf15e- flytekit/bin/entrypoint.py
- flytekit/core/base_task.py
- flytekit/core/constants.py
- flytekit/core/context_manager.py
- flytekit/deck/deck.py
- flytekit/models/task.py
- flytekit/tools/translator.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Changelist by Bito
This pull request implements the following key changes.
| Key Change | Files Impacted |
|---|---|
| Feature Improvement - Enhanced Deck Functionality and API |
- - - - - - |
| Testing - Deck Feature Test Coverage |
- - |
| Documentation - Documentation Updates |
- |
FYI @fg91 since you also want to use it. would love to get your feedback
I'm a big fan of such a feature - being able to publish realtime updates from a task to flyte console was the topic of various discussions in the past (e.g. this or this):
# A very similar API was discussed back then: deck = flytekit.Deck("Summary", ...) deck.append(MarkdownRenderer.to_html(f"... {run.link} ...")) deck.flush()I have one question about the implementation. Does flytepropeller need to detect whenever the deck html in the bucket changed for the change to be reflected in the UI or does propeller only indicate to the task where to upload the deck to but a request from flyteconsole directly "goes to the bucket" without flytepropeller having to do further work?
flyteconsole will send a request to flyteadmin, and flyteadmin will give it the deck html
Code Review Agent Run #75fbe2
Actionable Suggestions - 0
Review Details
-
Files reviewed - 3 · Commit Range:
7bcf15e..be02f9f- flytekit/core/base_task.py
- flytekit/deck/deck.py
- flytekit/tools/translator.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run #6220fd
Actionable Suggestions - 2
-
flytekit/deck/deck.py - 2
- Consider adding task_id null check · Line 88-89
- Consider adding None check for params · Line 184-185
Review Details
-
Files reviewed - 3 · Commit Range:
be02f9f..dc6d203- flytekit/core/base_task.py
- flytekit/core/constants.py
- flytekit/deck/deck.py
-
Files skipped - 1
- .github/workflows/monodocs_build.yml - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run #3bf552
Actionable Suggestions - 0
Review Details
-
Files reviewed - 1 · Commit Range:
dc6d203..41d8760- flytekit/core/base_task.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run #b6d959
Actionable Suggestions - 0
Additional Suggestions - 1
-
tests/flytekit/unit/test_translator.py - 1
- Consider more descriptive variable name · Line 96-101
Review Details
-
Files reviewed - 4 · Commit Range:
41d8760..b5976fe- flytekit/core/base_task.py
- flytekit/core/context_manager.py
- flytekit/deck/deck.py
- tests/flytekit/unit/test_translator.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run #f6709f
Actionable Suggestions - 0
Review Details
-
Files reviewed - 1 · Commit Range:
b5976fe..0c1a5a3- flytekit/deck/deck.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run #7a0ea5
Actionable Suggestions - 0
Review Details
-
Files reviewed - 3 · Commit Range:
0c1a5a3..2764ed4- Dockerfile.dev
- flytekit/core/base_task.py
- tests/flytekit/unit/test_translator.py
-
Files skipped - 1
- .github/workflows/monodocs_build.yml - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run #859f14
Actionable Suggestions - 0
Review Details
-
Files reviewed - 4 · Commit Range:
2764ed4..d8c408c- Dockerfile.dev
- flytekit/core/base_task.py
- flytekit/models/task.py
- flytekit/tools/translator.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run Status
- Limitations and other issues: ❌ Failure - Bito Code Review Agent didn't review this pull request automatically because it exceeded the size limit. No action is needed if you didn't intend for the agent to review it. Otherwise, you can initiate the review by typing
/reviewin a comment below.
/review
Code Review Agent Run #077cc1
Actionable Suggestions - 4
-
flytekit/core/base_task.py - 1
- Consider adding validation for generates_deck flag · Line 143-143
-
tests/flytekit/unit/test_translator.py - 2
- Consider parameterizing deck test cases · Line 107-130
- Consider consolidating duplicate serialization settings · Line 116-129
-
flytekit/models/task.py - 1
- Consider validating generates_deck field existence · Line 357-357
Additional Suggestions - 3
-
flytekit/models/task.py - 1
- Consider adding type hint for attribute · Line 223-223
-
tests/flytekit/unit/test_translator.py - 1
- Consider more descriptive variable name · Line 97-97
-
flytekit/core/base_task.py - 1
- Consider grouping deck related operations together · Line 724-727
Review Details
-
Files reviewed - 8 · Commit Range:
01182b4..1d6417a- flytekit/bin/entrypoint.py
- flytekit/core/base_task.py
- flytekit/core/constants.py
- flytekit/deck/deck.py
- flytekit/models/task.py
- flytekit/tools/translator.py
- pydoclint-errors-baseline.txt
- tests/flytekit/unit/test_translator.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Code Review Agent Run #747ad3
Actionable Suggestions - 4
-
flytekit/tools/translator.py - 1
- Consider restructuring nested conditions for clarity · Line 190-194
-
tests/flytekit/unit/deck/test_deck.py - 1
- Consider simplifying complex boolean expression · Line 276-276
-
flytekit/core/base_task.py - 2
- Consider adding null check for deck_fields · Line 724-727
- Consider adding null check for user_space_params · Line 724-727
Additional Suggestions - 2
-
flytekit/deck/deck.py - 1
- Consider single line for parameters · Line 159-160
-
flytekit/models/task.py - 1
- Consider adding type hint for attribute · Line 223-223
Review Details
-
Files reviewed - 9 · Commit Range:
01182b4..ea8b6e0- flytekit/bin/entrypoint.py
- flytekit/core/base_task.py
- flytekit/core/constants.py
- flytekit/deck/deck.py
- flytekit/models/task.py
- flytekit/tools/translator.py
- pydoclint-errors-baseline.txt
- tests/flytekit/unit/deck/test_deck.py
- tests/flytekit/unit/test_translator.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
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?
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
Code Review Agent Run #1c8466
Actionable Suggestions - 0
Review Details
-
Files reviewed - 1 · Commit Range:
ea8b6e0..a642c9d- flytekit/deck/deck.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful