Commit fc1077f6 authored by Manuel Günther's avatar Manuel Günther
Browse files

Handled issue with missing probes in fileset protocol

parent b279347d
......@@ -266,10 +266,6 @@ def test_verify_filelist():
def test_verify_missing():
try:
import bob.db.verification.filelist
except ImportError:
raise SkipTest("Skipping test since bob.db.verification.filelist is not available")
test_dir = tempfile.mkdtemp(prefix='bobtest_')
# define dummy parameters
parameters = [
......
......@@ -29,13 +29,14 @@ def _scores(algorithm, model, probes, allow_missing_files):
for i, probe_element in enumerate(probes):
if fs.uses_probe_file_sets():
assert isinstance(probe_element, list)
# read probe from probe_set
probe = [algorithm.read_probe(probe_file) for probe_file in probe_element]
# filter missing files
if allow_missing_files:
probe = utils.filter_missing_files(probe)
if not probe:
probe_element = utils.filter_missing_files(probe_element)
if not probe_element:
# we keep the NaN score
continue
# read probe from probe_set
probe = [algorithm.read_probe(probe_file) for probe_file in probe_element]
# compute score
scores[0,i] = algorithm.score_for_multiple_probes(model, probe)
else:
......
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