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

Auto Display of Deck in Jupyter notebook #1161

Merged
merged 7 commits into from
Nov 8, 2022
Merged

Conversation

kumare3
Copy link
Contributor

@kumare3 kumare3 commented Sep 13, 2022

Signed-off-by: Ketan Umare ketan.umare@gmail.com

TL;DR

Jupyter notebook can now display FlyteDecks natively

FlyteDecks are html objects. In IPython, its own HTML objects are natively display-able. This changes detects that the environment is a notebook and makes the object match the expectation of IPython

            with flytekit.new_context() as ctx:
                my_task(...)
            ctx.get_deck()

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Jupyter notebook can now display FlyteDecks natively

FlyteDecks are html objects. In IPython, its own HTML objects are
natively display-able. This changes detects that the environment is
a notebook and makes the object match the expectation of IPython

Signed-off-by: Ketan Umare <ketan.umare@gmail.com>
flytekit/core/context_manager.py Outdated Show resolved Hide resolved
flytekit/deck/deck.py Outdated Show resolved Hide resolved
flytekit/deck/deck.py Show resolved Hide resolved
Signed-off-by: Ketan Umare <ketan.umare@gmail.com>
Signed-off-by: Ketan Umare <ketan.umare@gmail.com>
Signed-off-by: Ketan Umare <ketan.umare@gmail.com>
@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Merging #1161 (757acfd) into master (3b5d15a) will increase coverage by 0.00%.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##           master    #1161   +/-   ##
=======================================
  Coverage   68.85%   68.86%           
=======================================
  Files         287      287           
  Lines       26436    26444    +8     
  Branches     2498     2499    +1     
=======================================
+ Hits        18203    18210    +7     
- Misses       7748     7749    +1     
  Partials      485      485           
Impacted Files Coverage Δ
flytekit/core/context_manager.py 39.61% <0.00%> (ø)
flytekit/deck/deck.py 38.46% <75.00%> (+4.41%) ⬆️
tests/flytekit/unit/deck/test_deck.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@eapolinario eapolinario merged commit 10484cc into master Nov 8, 2022
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.

2 participants