Commit 47666724 authored by Pavel KORSHUNOV's avatar Pavel KORSHUNOV
Browse files

Clean up some code

parent 749c6799
Pipeline #3843 failed with stage
in 60 minutes and 33 seconds
......@@ -2,3 +2,4 @@ include README.rst buildout.cfg develop.cfg version.txt re
recursive-include doc *.py *.rst
recursive-include bob *.txt *.hdf5
recursive-include bob *.sql3
recursive-include bob/pad/base/test/data scores-* *.sql3
......@@ -57,8 +57,6 @@ def preprocess(preprocessor, groups=None, indices=None, force=False):
# get the file lists
data_files, original_directory, original_extension = fs.original_data_list_files(groups=groups)
preprocessed_data_files = fs.preprocessed_data_list(groups=groups)
print("len of data files: %s" %(str(len(data_files))))
print("len of preprocessed data files (paths): %s" %(str(len(preprocessed_data_files))))
# select a subset of keys to iterate
if indices is not None:
......@@ -112,14 +112,11 @@ def _save_scores(score_file, scores, toscore_objects, write_compressed=False):
for i, toscore_object in enumerate(toscore_objects):
id_str = (str(toscore_object.client_id)).zfill(3)
sample_name = str(toscore_object.make_path())
print("i=%d, scores=%s" % (i, str(scores)))
for score in scores[i]:
if not toscore_object.attack_type or toscore_object.attack_type=="None":
print("- Scoring: %s, id: %s, real" %(sample_name, id_str))
_write(f, "%s %s %s %.12f\n" % (id_str, id_str, sample_name, score), write_compressed)
attackname = toscore_object.attack_type
print("- Scoring: %s, id: %s, attack: %s" %(sample_name, id_str, attackname))
_write(f, "%s %s %s %.12f\n" % (id_str, attackname, sample_name, score), write_compressed)
_close_written(score_file, f, write_compressed)
Supports Markdown
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