Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loom
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Vander Aa
loom
Commits
61769aa2
Commit
61769aa2
authored
8 years ago
by
Vojtech Cima
Browse files
Options
Downloads
Patches
Plain Diff
WIP
parent
c9e74092
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/loom/lore/html.py
+17
-0
17 additions, 0 deletions
python/loom/lore/html.py
python/loom/lore/report.py
+9
-0
9 additions, 0 deletions
python/loom/lore/report.py
with
26 additions
and
0 deletions
python/loom/lore/html.py
+
17
−
0
View file @
61769aa2
...
...
@@ -154,6 +154,22 @@ def create_pending_tasks(report):
return
column
([
f2
,
f1
])
def
create_running_tasks
(
report
):
ds
=
report
.
get_running_tasks
()
ds
=
ds
.
sort_values
(
"
time
"
)
names
=
ds
[
"
group
"
].
unique
()
names
.
sort
()
f1
=
figure
(
plot_width
=
1000
,
plot_height
=
400
)
for
color
,
name
in
zip
(
create_colors
(
len
(
names
)),
names
):
frame
=
ds
[
ds
[
"
group
"
]
==
name
]
f1
.
line
(
frame
.
time
,
frame
.
change
.
cumsum
(),
color
=
color
,
legend
=
name
,
line_width
=
1
)
f2
=
figure
(
plot_width
=
1000
,
plot_height
=
400
)
f2
.
line
(
ds
.
time
,
ds
.
change
.
cumsum
(),
line_width
=
1
)
return
column
([
f2
,
f1
])
def
create_scheduling_time
(
report
):
ds
=
report
.
scheduler_times
duration
=
ds
[
"
end_time
"
]
-
ds
[
"
start_time
"
]
...
...
@@ -181,6 +197,7 @@ def create_html(report, filename):
scheduling
=
Tabs
(
tabs
=
[
Panel
(
child
=
create_timelines
(
report
),
title
=
"
Timeline
"
),
Panel
(
child
=
create_pending_tasks
(
report
),
title
=
"
Pending tasks
"
),
Panel
(
child
=
create_running_tasks
(
report
),
title
=
"
Running tasks
"
),
Panel
(
child
=
create_scheduling_time
(
report
),
title
=
"
Scheduling time
"
),
])
...
...
This diff is collapsed.
Click to expand it.
python/loom/lore/report.py
+
9
−
0
View file @
61769aa2
...
...
@@ -208,6 +208,15 @@ class Report:
return
pd
.
DataFrame
(
create_items
(),
columns
=
[
"
time
"
,
"
change
"
,
"
group
"
])
def
get_running_tasks
(
self
):
def
create_items
():
for
t
in
self
.
tasks
.
values
():
group_name
=
t
.
group_name
yield
t
.
start_time
,
1
,
group_name
yield
t
.
end_time
,
-
1
,
group_name
return
pd
.
DataFrame
(
create_items
(),
columns
=
[
"
time
"
,
"
change
"
,
"
group
"
])
def
get_group_names
(
self
):
return
sorted
(
set
(
t
.
group_name
for
t
in
self
.
tasks
.
values
()))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment