Commit b81f04aa authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME
Browse files

Rename the metric log option, rename eval->evaluation variable

parent 00a68cf5
Pipeline #19166 failed with stage
in 29 minutes and 19 seconds
......@@ -12,7 +12,7 @@ from bob.extension.scripts.click_helper import (verbosity_option,
......@@ -193,7 +193,7 @@ def hist(ctx, scores, evaluation, **kwargs):
......@@ -241,12 +241,10 @@ def output_plot_file_option(default_out='plots.pdf', **kwargs):
callback=callback, **kwargs)(func)
return custom_output_plot_file_option
def output_plot_metric_option(**kwargs):
def output_log_metric_option(**kwargs):
'''Get options for output file for metrics'''
def custom_output_plot_file_option(func):
def custom_output_log_file_option(func):
def callback(ctx, param, value):
''' Save ouput file and associated pdf in context list,
print the path of the file in the log'''
if value is not None:
LOGGER.debug("Metrics will be output in %s", value)
ctx.meta['log'] = value
......@@ -256,7 +254,7 @@ def output_plot_metric_option(**kwargs):
help='If provided, computed numbers are written to '
'this file instead of the standard output.',
callback=callback, **kwargs)(func)
return custom_output_plot_file_option
return custom_output_log_file_option
def criterion_option(lcriteria=['eer', 'hter', 'far'], **kwargs):
"""Get option flag to tell which criteriom is used (default:eer)
......@@ -38,7 +38,7 @@ class MeasureBase(object):
Function that is used to load the input files
__metaclass__ = ABCMeta #for python 2.7 compatibility
def __init__(self, ctx, scores, eval, func_load):
def __init__(self, ctx, scores, evaluation, func_load):
......@@ -63,7 +63,7 @@ class MeasureBase(object):
if self._titles is not None and len(self._titles) != self.n_sytem:
raise click.BadParameter("Number of titles must be equal to the "
"number of systems")
self._eval = eval
self._eval = evaluation
def run(self):
""" Generate outputs (e.g. metrics, files, pdf plots).
Supports Markdown
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