Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.measure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.measure
Commits
14e852f2
There was a problem fetching the pipeline summary.
Commit
14e852f2
authored
Apr 12, 2018
by
Theophile GENTILHOMME
Browse files
Options
Downloads
Patches
Plain Diff
Change defaults behaviors for titles
parent
c83442c1
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!54
Refactors the score loading and scripts functionality
,
!52
generic plotting script for bob measure
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/measure/script/common_options.py
+1
-1
1 addition, 1 deletion
bob/measure/script/common_options.py
bob/measure/script/figure.py
+12
-9
12 additions, 9 deletions
bob/measure/script/figure.py
with
13 additions
and
10 deletions
bob/measure/script/common_options.py
+
1
−
1
View file @
14e852f2
...
...
@@ -126,7 +126,7 @@ def show_dev_option(dflt=False, **kwargs):
'''
Option to tell if should show dev histo
'''
return
bool_option
(
'
show-dev
'
,
'
D
'
,
'
If set, show dev histograms
'
,
dflt
)
def
print_filenames_option
(
dflt
=
Fals
e
,
**
kwargs
):
def
print_filenames_option
(
dflt
=
Tru
e
,
**
kwargs
):
'''
Option to tell if filenames should be in the title
'''
return
bool_option
(
'
show-fn
'
,
'
P
'
,
'
If set, show filenames in title
'
,
dflt
)
...
...
This diff is collapsed.
Click to expand it.
bob/measure/script/figure.py
+
12
−
9
View file @
14e852f2
...
...
@@ -392,7 +392,7 @@ class PlotBase(MeasureBase):
self
.
_axlim
=
None
if
'
axlim
'
not
in
ctx
.
meta
else
ctx
.
meta
[
'
axlim
'
]
self
.
_clayout
=
None
if
'
clayout
'
not
in
ctx
.
meta
else
\
ctx
.
meta
[
'
clayout
'
]
self
.
_print_fn
=
Fals
e
if
'
show_fn
'
not
in
ctx
.
meta
else
\
self
.
_print_fn
=
Tru
e
if
'
show_fn
'
not
in
ctx
.
meta
else
\
ctx
.
meta
[
'
show_fn
'
]
self
.
_x_rotation
=
None
if
'
x_rotation
'
not
in
ctx
.
meta
else
\
ctx
.
meta
[
'
x_rotation
'
]
...
...
@@ -657,12 +657,11 @@ class Hist(PlotBase):
self
.
_get_neg_pos_thres
(
idx
,
dev_score
,
eval_score
)
fig
=
mpl
.
figure
()
mpl
.
title
(
self
.
_get_title
(
dev_file
,
eval_file
))
if
eval_neg
is
not
None
and
self
.
_show_dev
:
mpl
.
subplot
(
2
,
1
,
1
)
mpl
.
title
(
self
.
_get_title
(
dev_file
,
eval_file
))
if
self
.
_show_dev
:
self
.
_setup_hist
(
dev_neg
,
dev_pos
)
mpl
.
title
(
self
.
_get_title
(
idx
,
dev_file
,
eval_file
))
mpl
.
ylabel
(
self
.
_y_label
)
mpl
.
xlabel
(
self
.
_x_label
)
if
eval_neg
is
not
None
and
self
.
_show_dev
:
...
...
@@ -679,6 +678,8 @@ class Hist(PlotBase):
self
.
_setup_hist
(
eval_neg
,
eval_pos
)
if
not
self
.
_show_dev
:
mpl
.
title
(
self
.
_get_title
(
idx
,
dev_file
,
eval_file
))
mpl
.
ylabel
(
'
Eval. probability density
'
)
mpl
.
xlabel
(
self
.
_x_label
)
#Setup lines, corresponding axis and legends
...
...
@@ -689,7 +690,9 @@ class Hist(PlotBase):
fig
.
set_tight_layout
(
True
)
self
.
_pdf_page
.
savefig
(
fig
)
def
_get_title
(
self
,
dev_file
,
eval_file
):
def
_get_title
(
self
,
idx
,
dev_file
,
eval_file
):
title
=
self
.
_titles
[
idx
]
if
self
.
_titles
is
not
None
else
None
if
title
is
None
:
title
=
self
.
_title_base
if
not
self
.
_print_fn
else
\
(
'
%s (%s)
'
%
(
self
.
_title_base
,
...
...
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
sign in
to comment