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

use default settings for timeline deck width #1748

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 1 addition & 3 deletions flytekit/deck/deck.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@ def html(self) -> str:
df["ProcessTime"] = df["ProcessTime"].apply(lambda time: "{:.6f}".format(time))
df["WallTime"] = df["WallTime"].apply(lambda time: "{:.6f}".format(time))

width = 1400
gantt_chart_html = GanttChartRenderer().to_html(df, chart_width=width)
gantt_chart_html = GanttChartRenderer().to_html(df)
time_table_html = TableRenderer().to_html(
df[["Name", "WallTime", "ProcessTime"]],
header_labels=["Name", "Wall Time(s)", "Process Time(s)"],
table_width=width,
)
return gantt_chart_html + time_table_html + note

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 @@ -37,7 +37,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