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

raising errors instead of emitting warnings in case of unsuccessful processing

parent 147e04e7
No related branches found
No related tags found
1 merge request!63raising errors instead of emitting warnings in case of unsuccessful processing
Pipeline #
...@@ -136,8 +136,8 @@ def project(algorithm, extractor, groups = None, indices = None, allow_missing_f ...@@ -136,8 +136,8 @@ def project(algorithm, extractor, groups = None, indices = None, allow_missing_f
logger.debug("... Projection for extracted file %s failed; skipping", feature_file) logger.debug("... Projection for extracted file %s failed; skipping", feature_file)
continue continue
else: else:
logger.error("Projection of file '%s' was not successful", feature_file) raise RuntimeError("Projection of file '%s' was not successful" % feature_file)
continue
# write it # write it
algorithm.write_feature(projected, projected_file) algorithm.write_feature(projected, projected_file)
...@@ -284,8 +284,7 @@ def enroll(algorithm, extractor, compute_zt_norm, indices = None, groups = ['dev ...@@ -284,8 +284,7 @@ def enroll(algorithm, extractor, compute_zt_norm, indices = None, groups = ['dev
logger.debug("... Enrollment for model %s failed; skipping", model_id) logger.debug("... Enrollment for model %s failed; skipping", model_id)
continue continue
else: else:
logger.error("Enrollemnt of model '%s' was not successful", model_id) raise RuntimeError("Enrollemnt of model '%s' was not successful" % model_id)
continue
# save the model # save the model
algorithm.write_model(model, model_file) algorithm.write_model(model, model_file)
...@@ -332,8 +331,7 @@ def enroll(algorithm, extractor, compute_zt_norm, indices = None, groups = ['dev ...@@ -332,8 +331,7 @@ def enroll(algorithm, extractor, compute_zt_norm, indices = None, groups = ['dev
logger.debug("... Enrollment for T-model %s failed; skipping", t_model_id) logger.debug("... Enrollment for T-model %s failed; skipping", t_model_id)
continue continue
else: else:
logger.error("Enrollemnt of T-model '%s' was not successful", t_model_id) raise RuntimeError("Enrollemnt of T-model '%s' was not successful", t_model_id)
continue
# save model # save model
algorithm.write_model(t_model, t_model_file) algorithm.write_model(t_model, t_model_file)
......
...@@ -125,8 +125,8 @@ def extract(extractor, preprocessor, groups=None, indices = None, allow_missing_ ...@@ -125,8 +125,8 @@ def extract(extractor, preprocessor, groups=None, indices = None, allow_missing_
logger.debug("... Feature extraction for data file %s failed; skipping", data_file) logger.debug("... Feature extraction for data file %s failed; skipping", data_file)
continue continue
else: else:
logger.error("Feature extraction of file '%s' was not successful", data_file) raise RuntimeError("Feature extraction of file '%s' was not successful" % data_file)
continue
# write feature # write feature
extractor.write_feature(feature, feature_file) extractor.write_feature(feature, feature_file)
......
...@@ -80,9 +80,9 @@ def preprocess(preprocessor, groups = None, indices = None, allow_missing_files ...@@ -80,9 +80,9 @@ def preprocess(preprocessor, groups = None, indices = None, allow_missing_files
if preprocessed_data is None: if preprocessed_data is None:
if allow_missing_files: if allow_missing_files:
logger.debug("... Processing original data file '%s' was not successful", file_name) logger.debug("... Processing original data file '%s' was not successful", file_name)
continue
else: else:
logger.error("Preprocessing of file '%s' was not successful", file_name) raise RuntimeError("Preprocessing of file '%s' was not successful" % file_name)
continue
# write the data # write the data
preprocessor.write_data(preprocessed_data, preprocessed_data_file) preprocessor.write_data(preprocessed_data, preprocessed_data_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment