Skip to content
Snippets Groups Projects
Commit 449a70c5 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Organized the --sub-directory option and automatically deleted the temp file

Put the temp files back

Organized the --sub-directories for the baselines
parent dec5fa81
Branches
Tags
1 merge request!155Write parameters in a temporary config file to enable chain loading
Pipeline #
......@@ -14,6 +14,7 @@ from bob.extension.scripts.click_helper import verbosity_option
import click
import tempfile
import logging
import os
logger = logging.getLogger("bob.bio.base")
......@@ -59,6 +60,12 @@ def baseline(ctx, baseline, database):
db = search_preprocessor(database, loaded_baseline.preprocessors.keys())
preprocessor = loaded_baseline.preprocessors[db]
# this is the default sub-directory that is used
if "-T" in ctx.args or "--temp-directory" in ctx.args:
sub_directory = os.path.join(database, baseline)
else:
sub_directory = baseline
logger.debug('Database groups are %s', database_data["groups"])
# call verify with newly generated config file. We will create a new config
......@@ -77,7 +84,7 @@ verbose = {verbose}
extractor=loaded_baseline.extractor,
algorithm=loaded_baseline.algorithm,
database=database,
sub_directory=baseline,
sub_directory=sub_directory,
groups="', '".join(database_data["groups"]),
verbose=ctx.meta['verbosity'],
)
......@@ -90,3 +97,4 @@ verbose = {verbose}
verify([f.name] + ctx.args)
click.echo("You may want to delete `{}' after the experiments are "
"finished running.".format(f.name))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment