Commit 19909ce3 authored by Yannick DAYER's avatar Yannick DAYER

The gen command generates both dev and eval scores

parent b46a38bf
...@@ -167,7 +167,7 @@ def gen_pad_csv_scores( ...@@ -167,7 +167,7 @@ def gen_pad_csv_scores(
@click.command() @click.command()
@click.argument("outfile") @click.argument("outdir")
@click.option("-mm", "--mean-match", default=10, type=click.FLOAT, show_default=True) @click.option("-mm", "--mean-match", default=10, type=click.FLOAT, show_default=True)
@click.option( @click.option(
"-ma", "-ma",
...@@ -183,7 +183,7 @@ def gen_pad_csv_scores( ...@@ -183,7 +183,7 @@ def gen_pad_csv_scores(
@verbosity_option() @verbosity_option()
@click.pass_context @click.pass_context
def gen( def gen(
ctx, outfile, mean_match, mean_attacks, n_clients, n_samples, n_attacks, **kwargs ctx, outdir, mean_match, mean_attacks, n_clients, n_samples, n_attacks, **kwargs
): ):
"""Generate random scores. """Generate random scores.
Generates random scores in CSV format. The scores are generated Generates random scores in CSV format. The scores are generated
...@@ -198,9 +198,21 @@ def gen( ...@@ -198,9 +198,21 @@ def gen(
bob pad gen results/generated/scores-dev.csv bob pad gen results/generated/scores-dev.csv
""" """
numpy.random.seed(0) numpy.random.seed(0)
os.makedirs(os.path.dirname(outfile), exist_ok=True)
gen_pad_csv_scores( gen_pad_csv_scores(
outfile, mean_match, mean_attacks, n_attacks, n_clients, n_samples os.path.join(outdir, "scores-dev.csv"),
mean_match,
mean_attacks,
n_attacks,
n_clients,
n_samples,
)
gen_pad_csv_scores(
os.path.join(outdir, "scores-eval.csv"),
mean_match,
mean_attacks,
n_attacks,
n_clients,
n_samples,
) )
......
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