Commit 8d81e184 authored by Vincent POLLET's avatar Vincent POLLET

Allow to specify the pipeline decision function in vanilla_pad script

parent 9ae20678
Pipeline #49287 failed with stage
in 3 minutes and 36 seconds
...@@ -28,6 +28,13 @@ from bob.pipelines.distributed import dask_get_partition_size ...@@ -28,6 +28,13 @@ from bob.pipelines.distributed import dask_get_partition_size
help="Feature extraction algorithm", help="Feature extraction algorithm",
cls=ResourceOption, 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( @click.option(
"--database", "--database",
"-d", "-d",
...@@ -93,6 +100,7 @@ from bob.pipelines.distributed import dask_get_partition_size ...@@ -93,6 +100,7 @@ from bob.pipelines.distributed import dask_get_partition_size
def vanilla_pad( def vanilla_pad(
ctx, ctx,
pipeline, pipeline,
decision_function,
database, database,
dask_client, dask_client,
groups, groups,
...@@ -169,7 +177,8 @@ def vanilla_pad( ...@@ -169,7 +177,8 @@ def vanilla_pad(
for group in groups: for group in groups:
logger.info(f"Running vanilla biometrics for group {group}") logger.info(f"Running vanilla biometrics for group {group}")
result = pipeline.decision_function(predict_samples[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}") 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