Skip to content
Snippets Groups Projects
Commit 80b54521 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[script.significance] Allow user to set the number of workers to use in parallel

parent 4364dd69
No related branches found
No related tags found
No related merge requests found
Pipeline #41195 failed
......@@ -292,6 +292,17 @@ def _write_analysis_figures(names, da, db, folder):
show_default=True,
cls=ResourceOption,
)
@click.option(
"--parallel",
"-x",
help="Set the number of parallel processes to use when running using
multiprocessing. A value of zero uses all reported cores.",
default=1,
type=int,
show_default=True,
required=True,
cls=ResourceOption,
)
@verbosity_option(cls=ResourceOption)
def significance(
names,
......@@ -305,6 +316,7 @@ def significance(
figure,
output_folder,
remove_outliers,
parallel,
**kwargs,
):
"""Evaluates how significantly different are two models on the same dataset
......@@ -357,7 +369,7 @@ def significance(
size,
stride,
figure,
nproc=0,
nproc=parallel,
outdir=dir1,
)
......@@ -377,7 +389,7 @@ def significance(
size,
stride,
figure,
nproc=0,
nproc=parallel,
outdir=dir2,
)
......@@ -405,7 +417,7 @@ def significance(
size,
stride,
figure,
nproc=0,
nproc=parallel,
outdir=dirdiff,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment