Skip to content

Commit

Permalink
Capitalize flyte deck header names (flyteorg#2254)
Browse files Browse the repository at this point in the history
* Capitalize deck names

Signed-off-by: Thomas J. Fan <[email protected]>

* TST Fixes tests for names

Signed-off-by: Thomas J. Fan <[email protected]>

---------

Signed-off-by: Thomas J. Fan <[email protected]>
Co-authored-by: Kevin Su <[email protected]>
  • Loading branch information
2 people authored and austin362667 committed Mar 16, 2024
1 parent 0b34da6 commit 1e233d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions flytekit/core/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,8 @@ def _write_decks(self, native_inputs, native_outputs_as_map, ctx, new_user_param
if self._disable_deck is False:
from flytekit.deck.deck import Deck, _output_deck

INPUT = "input"
OUTPUT = "output"
INPUT = "Inputs"
OUTPUT = "Outputs"

input_deck = Deck(INPUT)
for k, v in native_inputs.items():
Expand Down
2 changes: 1 addition & 1 deletion flytekit/core/context_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def timeline_deck(self) -> "TimeLineDeck": # type: ignore
time_line_deck = deck
break
if time_line_deck is None:
time_line_deck = TimeLineDeck("timeline")
time_line_deck = TimeLineDeck("Timeline")

return time_line_deck

Expand Down
2 changes: 1 addition & 1 deletion plugins/flytekit-kf-pytorch/tests/test_elastic_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def wf():

ctx = flytekit.current_context()

expected_deck_names = {"timeline", "default", "test-deck"}
expected_deck_names = {"Timeline", "default", "test-deck"}
found_deck_names = set(d.name for d in ctx.decks)

assert expected_deck_names.issubset(found_deck_names)
Expand Down
2 changes: 1 addition & 1 deletion tests/flytekit/unit/deck/test_deck.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_timeline_deck():
ctx.user_space_params._decks = []
timeline_deck = ctx.user_space_params.timeline_deck
timeline_deck.append_time_info(time_info)
assert timeline_deck.name == "timeline"
assert timeline_deck.name == "Timeline"
assert len(timeline_deck.time_info) == 1
assert timeline_deck.time_info[0] == time_info
assert len(ctx.user_space_params.decks) == 1
Expand Down

0 comments on commit 1e233d7

Please sign in to comment.