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