Commit ec1b85d7 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

Replace a force_eval option so that no evaluation option is needed when...

Replace a force_eval option so that no evaluation option is needed when evaluation scores are mandatory
parent 3ab86e37
Pipeline #19290 passed with stage
in 30 minutes and 1 second
......@@ -118,7 +118,7 @@ def det(ctx, scores, evaluation, **kwargs):
process.run()
@click.command()
@common_options.scores_argument(min_arg=2, nargs=-1)
@common_options.scores_argument(min_arg=1, force_eval=True, nargs=-1)
@common_options.output_plot_file_option(default_out='epc.pdf')
@common_options.title_option()
@common_options.titles_option()
......
......@@ -9,7 +9,7 @@ from bob.extension.scripts.click_helper import (bool_option, list_float_option)
LOGGER = logging.getLogger(__name__)
def scores_argument(min_arg=1, **kwargs):
def scores_argument(min_arg=1, force_eval=False, **kwargs):
"""Get the argument for scores, and add `dev-scores` and `eval-scores` in
the context when `--evaluation` flag is on (default)
......@@ -29,7 +29,7 @@ def scores_argument(min_arg=1, **kwargs):
min_a = min_arg or 1
mutli = 1
error = ''
if 'evaluation' in ctx.meta and ctx.meta['evaluation']:
if ('evaluation' in ctx.meta and ctx.meta['evaluation']) or force_eval:
mutli += 1
error += '- %d evaluation file(s) \n' % min_a
if 'train' in ctx.meta and ctx.meta['train']:
......
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