Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HyperLoom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
ADAS
HyperLoom
Commits
201ba8e4
Commit
201ba8e4
authored
8 years ago
by
Ada Böhm
Browse files
Options
Downloads
Patches
Plain Diff
ENH: ":" delimiter in labels
parent
451319ed
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/rview/report.py
+26
-9
26 additions, 9 deletions
python/loom/rview/report.py
tests/client/cv_test.py
+2
-2
2 additions, 2 deletions
tests/client/cv_test.py
with
28 additions
and
11 deletions
python/loom/rview/report.py
+
26
−
9
View file @
201ba8e4
...
...
@@ -44,7 +44,24 @@ class Report:
labels
.
add
(
task
.
label
)
else
:
labels
.
add
(
symbols
[
task
.
task_type
])
return
sorted
(
labels
)
label_groups
=
{}
group_names
=
[]
labels
=
sorted
(
labels
)
for
label
in
labels
:
if
"
:
"
in
label
:
group
=
label
.
split
(
"
:
"
)[
0
].
strip
()
else
:
group
=
label
try
:
index
=
group_names
.
index
(
group
)
except
ValueError
:
index
=
len
(
group_names
)
group_names
.
append
(
group
)
label_groups
[
label
]
=
index
return
label_groups
,
group_names
def
create_graph
(
self
):
TASK_START
=
loomcomm
.
Event
.
TASK_START
...
...
@@ -56,8 +73,8 @@ class Report:
if
event
.
type
==
TASK_START
:
task_workers
[
event
.
id
]
=
event
.
worker_id
labels
=
self
.
collect_labels
()
colors
=
[
dot_color
(
c
)
for
c
in
generate_colors
(
len
(
label
s
))]
label
_groups
,
group_name
s
=
self
.
collect_labels
()
colors
=
[
dot_color
(
c
)
for
c
in
generate_colors
(
len
(
group_name
s
))]
for
i
,
task
in
enumerate
(
self
.
report_msg
.
plan
.
tasks
):
node
=
graph
.
node
(
i
)
...
...
@@ -69,8 +86,8 @@ class Report:
if
task_workers
:
node
.
label
+=
"
\n
w={}
"
.
format
(
task_workers
[
i
])
node
.
fillcolor
=
colors
[
label
s
.
index
(
label
)
]
node
.
color
=
colors
[
label
s
.
index
(
label
)
]
node
.
fillcolor
=
colors
[
label
_groups
[
label
]
]
node
.
color
=
colors
[
label
_groups
[
label
]
]
for
j
in
task
.
input_ids
:
graph
.
node
(
j
).
add_arc
(
node
)
return
graph
...
...
@@ -81,7 +98,7 @@ class Report:
workers
=
{}
symbols
=
self
.
symbols
labels
=
self
.
collect_labels
()
label
_groups
,
group_name
s
=
self
.
collect_labels
()
for
event
in
self
.
report_msg
.
events
:
lst
=
workers
.
get
(
event
.
worker_id
)
...
...
@@ -109,7 +126,7 @@ class Report:
colors
=
[]
y_labels
=
[]
color_list
=
generate_colors
(
len
(
label
s
))
color_list
=
generate_colors
(
len
(
group_name
s
))
tasks
=
self
.
report_msg
.
plan
.
tasks
index
=
0
...
...
@@ -126,7 +143,7 @@ class Report:
label
=
task
.
label
else
:
label
=
symbols
[
task
.
task_type
]
colors
.
append
(
color_list
[
label
s
.
index
(
label
)
])
colors
.
append
(
color_list
[
label
_groups
[
label
]
])
index
+=
1
index
+=
1
...
...
@@ -136,4 +153,4 @@ class Report:
colors
,
y_labels
,
[(
l
,
color_list
[
i
])
for
i
,
l
in
enumerate
(
label
s
)])
for
i
,
l
in
enumerate
(
group_name
s
)])
This diff is collapsed.
Click to expand it.
tests/client/cv_test.py
+
2
−
2
View file @
201ba8e4
...
...
@@ -26,10 +26,10 @@ def test_cv_iris(loom_env):
for
i
in
xrange
(
CHUNKS
)]
models
=
[]
for
ts
in
trainsets
:
for
i
,
ts
in
enumerate
(
trainsets
)
:
model
=
tasks
.
run
(
"
svm-train data
"
,
[(
ts
,
"
data
"
)],
[
"
data.model
"
])
model
.
label
=
"
svm-train
"
model
.
label
=
"
svm-train
: {}
"
.
format
(
i
)
models
.
append
(
model
)
predict
=
[]
...
...
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