Commit 1358cfab authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

Modify code according to the changes in bob.measure

parent e477cb6f
Pipeline #19326 failed with stage
in 62 minutes and 17 seconds
......@@ -6,10 +6,8 @@ from bob.extension.scripts.click_helper import verbosity_option
from bob.bio.base.score import load
from . import figure
FUNC_SPLIT = lambda x: load.load_files(x, load.split)
@click.command()
@common_options.scores_argument(eval_mandatory=True, min_len=2, nargs=-1)
@common_options.scores_argument(min_arg=2, force_eval=True, nargs=-1)
@common_options.output_plot_file_option(default_out='det.pdf')
@common_options.titles_option()
@common_options.const_layout_option()
......@@ -48,5 +46,5 @@ def det(ctx, scores, criteria, real_data, **kwargs):
$ bob pad det {licit,spoof}/scores-{dev,eval}
"""
process = figure.Det(ctx, scores, True, FUNC_SPLIT, criteria, real_data)
process = figure.Det(ctx, scores, True, load.split, criteria, real_data)
process.run()
......@@ -6,10 +6,8 @@ from bob.extension.scripts.click_helper import verbosity_option
from bob.bio.base.score import load
from . import figure
FUNC_SPLIT = lambda x: load.load_files(x, load.split)
@click.command()
@common_options.scores_argument(eval_mandatory=True, min_len=2, nargs=-1)
@common_options.scores_argument(min_arg=2, force_eval=True, nargs=-1)
@common_options.output_plot_file_option(default_out='epc.pdf')
@common_options.titles_option()
@common_options.const_layout_option()
......@@ -43,11 +41,11 @@ def epc(ctx, scores, **kwargs):
$ bob pad epc {licit,spoof}/scores-{dev,eval}
"""
process = figure.Epc(ctx, scores, True, FUNC_SPLIT)
process = figure.Epc(ctx, scores, True, load.split)
process.run()
@click.command()
@common_options.scores_argument(eval_mandatory=True, min_len=2, nargs=-1)
@common_options.scores_argument(min_arg=2, force_eval=True, nargs=-1)
@common_options.output_plot_file_option(default_out='epsc.pdf')
@common_options.titles_option()
@common_options.const_layout_option()
......@@ -102,12 +100,12 @@ def epsc(ctx, scores, criteria, var_param, fixed_param, three_d, **kwargs):
if (ctx.meta['wer'] and ctx.meta['iapmr']):
raise click.BadParameter('Cannot plot both WER and IAPMR in 3D')
process = figure.Epsc3D(
ctx, scores, True, FUNC_SPLIT,
ctx, scores, True, load.split,
criteria, var_param, fixed_param
)
else:
process = figure.Epsc(
ctx, scores, True, FUNC_SPLIT,
ctx, scores, True, load.split,
criteria, var_param, fixed_param
)
process.run()
This diff is collapsed.
......@@ -6,8 +6,6 @@ from bob.extension.scripts.click_helper import (verbosity_option, bool_option)
from bob.bio.base.score import load
from . import figure
FUNC_SPLIT = lambda x: load.load_files(x, load.split)
@click.command()
@common_options.scores_argument(nargs=-1)
@common_options.output_plot_file_option(default_out='hist.pdf')
......@@ -44,11 +42,11 @@ def hist(ctx, scores, evaluation, **kwargs):
$ bob pad hist --criter hter dev-scores1 eval-scores1
"""
process = figure.HistPad(ctx, scores, evaluation, FUNC_SPLIT)
process = figure.HistPad(ctx, scores, evaluation, load.split)
process.run()
@click.command()
@common_options.scores_argument(nargs=-1, eval_mandatory=True, min_len=2)
@common_options.scores_argument(nargs=-1, min_arg=2)
@common_options.output_plot_file_option(default_out='vuln.pdf')
@common_options.eval_option()
@common_options.n_bins_option()
......@@ -102,5 +100,5 @@ def vuln(ctx, scores, evaluation, **kwargs):
$ bob pad vuln {licit,spoof}/scores-{dev,eval}
'''
process = figure.HistVuln(ctx, scores, evaluation, FUNC_SPLIT)
process = figure.HistVuln(ctx, scores, evaluation, load.split)
process.run()
......@@ -7,8 +7,6 @@ from bob.extension.scripts.click_helper import (verbosity_option,
from bob.bio.base.score import load
from . import figure
FUNC_SPLIT = lambda x: load.load_files(x, load.split)
@click.command(context_settings=dict(token_normalize_func=lambda x: x.lower()))
@common_options.scores_argument(nargs=-1)
@common_options.eval_option()
......@@ -51,5 +49,5 @@ def metrics(ctx, scores, evaluation, **kwargs):
$ bob pad metrics /path/to/system{1,2,3}/score-{dev,eval}
"""
process = figure.Metrics(ctx, scores, evaluation, FUNC_SPLIT)
process = figure.Metrics(ctx, scores, evaluation, load.split)
process.run()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment