Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.base
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.base
Commits
f18ee18a
There was a problem fetching the pipeline summary.
Commit
f18ee18a
authored
7 years ago
by
Theophile GENTILHOMME
Browse files
Options
Downloads
Patches
Plain Diff
Small changes
parent
3d67c5fa
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!146
Add 4-5-col files related functionalities and add click commands
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/bio/base/script/commands.py
+6
-6
6 additions, 6 deletions
bob/bio/base/script/commands.py
bob/bio/base/test/test_commands.py
+1
-1
1 addition, 1 deletion
bob/bio/base/test/test_commands.py
doc/experiments.rst
+2
-2
2 additions, 2 deletions
doc/experiments.rst
with
9 additions
and
9 deletions
bob/bio/base/script/commands.py
+
6
−
6
View file @
f18ee18a
...
...
@@ -27,7 +27,7 @@ def rank_option(**kwargs):
@common_options.table_option
()
@common_options.eval_option
()
@common_options.output_log_metric_option
()
@common_options.criterion_option
([
'
eer
'
,
'
hter
'
,
'
far
'
,
'
mindcf
'
,
'
cllr
'
,
'
rr
'
])
@common_options.criterion_option
([
'
eer
'
,
'
min-
hter
'
,
'
far
'
,
'
mindcf
'
,
'
cllr
'
,
'
rr
'
])
@common_options.cost_option
()
@common_options.thresholds_option
()
@common_options.far_option
()
...
...
@@ -37,7 +37,7 @@ def rank_option(**kwargs):
@click.pass_context
def
metrics
(
ctx
,
scores
,
evaluation
,
**
kargs
):
"""
Prints a single output line that contains all info for a given
criterion (eer,
hter, far, mindcf, cllr, rr).
criterion (eer,
min-
hter, far, mindcf, cllr, rr).
You need to provide one or more development score file(s) for each experiment.
You can also provide eval files along with dev files. If only dev-scores
...
...
@@ -316,7 +316,7 @@ def hist(ctx, scores, evaluation, **kwargs):
$ bob bio hist dev-scores1 eval-scores1 dev-scores2
eval-scores2
$ bob bio hist --criterion --show-dev hter dev-scores1 eval-scores1
$ bob bio hist --criterion --show-dev
min-
hter dev-scores1 eval-scores1
"""
process
=
bio_figure
.
Hist
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
.
run
()
...
...
@@ -383,8 +383,8 @@ def evaluate(ctx, scores, evaluation, **kwargs):
ctx
.
invoke
(
metrics
,
scores
=
scores
,
evaluation
=
evaluation
)
# other times, appends the content
ctx
.
meta
[
'
open_mode
'
]
=
'
a
'
click
.
echo
(
"
Computing metrics with HTER%s...
"
%
log_str
)
ctx
.
meta
[
'
criterion
'
]
=
'
hter
'
# no criterion passed in evaluate
click
.
echo
(
"
Computing metrics with
min-
HTER%s...
"
%
log_str
)
ctx
.
meta
[
'
criterion
'
]
=
'
min-
hter
'
# no criterion passed in evaluate
ctx
.
invoke
(
metrics
,
scores
=
scores
,
evaluation
=
evaluation
)
if
'
far_value
'
in
ctx
.
meta
and
ctx
.
meta
[
'
far_value
'
]
is
not
None
:
click
.
echo
(
"
Computing metrics with FAR=%f%s...
"
%
\
...
...
@@ -421,7 +421,7 @@ def evaluate(ctx, scores, evaluation, **kwargs):
# the last one closes the file
ctx
.
meta
[
'
closef
'
]
=
True
click
.
echo
(
"
Generating score histograms in %s...
"
%
ctx
.
meta
[
'
output
'
])
ctx
.
meta
[
'
criterion
'
]
=
'
ht
er
'
# no criterion passed in evaluate
ctx
.
meta
[
'
criterion
'
]
=
'
e
er
'
# no criterion passed in evaluate
ctx
.
forward
(
hist
)
click
.
echo
(
"
Evaluate successfully completed!
"
)
This diff is collapsed.
Click to expand it.
bob/bio/base/test/test_commands.py
+
1
−
1
View file @
f18ee18a
...
...
@@ -189,7 +189,7 @@ def test_hist():
assert
result
.
exit_code
==
0
,
(
result
.
exit_code
,
result
.
output
)
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
commands
.
hist
,
[
'
--criterion
'
,
'
hter
'
,
'
--output
'
,
result
=
runner
.
invoke
(
commands
.
hist
,
[
'
--criterion
'
,
'
min-
hter
'
,
'
--output
'
,
'
HISTO.pdf
'
,
'
-b
'
,
'
30,auto
'
,
'
--no-evaluation
'
,
dev1
,
dev2
])
if
result
.
output
:
...
...
This diff is collapsed.
Click to expand it.
doc/experiments.rst
+
2
−
2
View file @
f18ee18a
...
...
@@ -170,9 +170,9 @@ min.HTER) on a development set and apply it on an evaluation set, just do:
.. code-block:: sh
$ bob bio metrics {dev,test}-4col.txt --legends ExpA --criterion hter
$ bob bio metrics {dev,test}-4col.txt --legends ExpA --criterion
min-
hter
[Min. criterion: HTER ] Threshold on Development set `ExpA`: -4.830500e-03
[Min. criterion:
MIN-
HTER ] Threshold on Development set `ExpA`: -4.830500e-03
====== ====================== =================
ExpA Development dev-4col Eval. test-4col
====== ====================== =================
...
...
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