Commit fa01991f authored by Vincent POLLET's avatar Vincent POLLET

Allow to specify the pipeline decision function in vanilla_pad script

parent 9ae20678
......@@ -28,6 +28,13 @@ from bob.pipelines.distributed import dask_get_partition_size
help="Feature extraction algorithm",
cls=ResourceOption,
)
@click.option(
"--decision_function",
"-f",
show_default=True,
default="decision_function",
help="Name of the Pipeline step to call for results, eg 'score' or 'predict'"
)
@click.option(
"--database",
"-d",
......@@ -93,6 +100,7 @@ from bob.pipelines.distributed import dask_get_partition_size
def vanilla_pad(
ctx,
pipeline,
decision_function,
database,
dask_client,
groups,
......@@ -169,7 +177,7 @@ def vanilla_pad(
for group in groups:
logger.info(f"Running vanilla biometrics for group {group}")
result = pipeline.decision_function(predict_samples[group])
result = getattr(pipeline, decision_function)(predict_samples[group])
scores_path = os.path.join(output, f"scores-{group}")
......
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