Skip to content
Snippets Groups Projects
Commit fb9964be authored by Manuel Günther's avatar Manuel Günther
Browse files

Few fixes

parent b2df5610
No related branches found
No related tags found
No related merge requests found
...@@ -266,7 +266,7 @@ def check_requirements(replacements): ...@@ -266,7 +266,7 @@ def check_requirements(replacements):
for key in configuration.replace: for key in configuration.replace:
# check that the key is one of the known steps # check that the key is one of the known steps
if key not in steps: if key not in steps:
raise ValueError("The step '%s' defined in the configuration file is unknown; choose one of %s" % (key, steps)) raise ValueError("The step '%s' defined in the configuration file '%s' is unknown; choose one of %s" % (key, args.configuration_file, steps))
values.update(extract_values(configuration.replace[key], replacements)) values.update(extract_values(configuration.replace[key], replacements))
for requirement in configuration.requirements: for requirement in configuration.requirements:
test = replace(requirement, values) test = replace(requirement, values)
...@@ -444,6 +444,10 @@ def main(command_line_parameters = None): ...@@ -444,6 +444,10 @@ def main(command_line_parameters = None):
create_recursive(replace_dict, step_index = 0, directories = {}, dependency_level = 0) create_recursive(replace_dict, step_index = 0, directories = {}, dependency_level = 0)
# finally, write some information about the # finally, write some information about the
logger.info("The number of executed tasks is: %d, which are split up into %d jobs that are executed in the grid" %(task_count, job_count)) if args.grid is not None:
logger.info("The number of executed tasks is: %d, which are split up into %d jobs that are executed in the grid" , task_count, job_count)
if args.parallel is not None:
logger.info("The total amount of finsihed tasks is: %d", task_count)
return score_directories return score_directories
...@@ -38,6 +38,7 @@ def train_extractor(extractor, preprocessor, force = False): ...@@ -38,6 +38,7 @@ def train_extractor(extractor, preprocessor, force = False):
if utils.check_file(fs.extractor_file, force, 1000): if utils.check_file(fs.extractor_file, force, 1000):
logger.info("- Extraction: extractor '%s' already exists.", fs.extractor_file) logger.info("- Extraction: extractor '%s' already exists.", fs.extractor_file)
else: else:
bob.io.base.create_directories_safe(os.path.dirname(fs.extractor_file))
# read training files # read training files
train_files = fs.training_list('preprocessed', 'train_extractor', arrange_by_client = extractor.split_training_data_by_client) train_files = fs.training_list('preprocessed', 'train_extractor', arrange_by_client = extractor.split_training_data_by_client)
train_data = read_preprocessed_data(train_files, preprocessor, extractor.split_training_data_by_client) train_data = read_preprocessed_data(train_files, preprocessor, extractor.split_training_data_by_client)
...@@ -46,7 +47,6 @@ def train_extractor(extractor, preprocessor, force = False): ...@@ -46,7 +47,6 @@ def train_extractor(extractor, preprocessor, force = False):
else: else:
logger.info("- Extraction: training extractor '%s' using %d training files:", fs.extractor_file, len(train_files)) logger.info("- Extraction: training extractor '%s' using %d training files:", fs.extractor_file, len(train_files))
# train model # train model
bob.io.base.create_directories_safe(os.path.dirname(fs.extractor_file))
extractor.train(train_data, fs.extractor_file) extractor.train(train_data, fs.extractor_file)
......
...@@ -114,12 +114,6 @@ class GridSubmission: ...@@ -114,12 +114,6 @@ class GridSubmission:
return self.fake_job_id return self.fake_job_id
def grid_job_id(self):
id = os.getenv('JOB_ID')
if id is not None:
return int(id)
return id
def execute_local(self): def execute_local(self):
"""Starts the local deamon and waits until it has finished.""" """Starts the local deamon and waits until it has finished."""
logger.info("Starting jman deamon to run the jobs on the local machine.") logger.info("Starting jman deamon to run the jobs on the local machine.")
......
...@@ -59,7 +59,7 @@ def read_config_file(filename, keyword = None): ...@@ -59,7 +59,7 @@ def read_config_file(filename, keyword = None):
""" """
if not os.path.exists(filename): if not os.path.exists(filename):
raise IOError("The given configuration file '%s' could not be found" % file) raise IOError("The given configuration file '%s' could not be found" % filename)
import string import string
import random import random
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment