Commit c50e1c52 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'mark-slow-tests' into 'master'

[tests] Mark tensorflow tests as slow

See merge request !107
parents 6ac6ba52 3dd816da
Pipeline #49295 passed with stages
in 37 minutes and 20 seconds
...@@ -12,6 +12,7 @@ import os ...@@ -12,6 +12,7 @@ import os
import bob.io.base import bob.io.base
import functools import functools
import copy import copy
from nose.plugins.attrib import attr
from bob.bio.base.test.utils import is_library_available from bob.bio.base.test.utils import is_library_available
...@@ -106,31 +107,37 @@ def run_baseline(baseline, samples_for_training=[]): ...@@ -106,31 +107,37 @@ def run_baseline(baseline, samples_for_training=[]):
assert "scores" in dirs assert "scores" in dirs
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_facenet_baseline(): def test_facenet_baseline():
run_baseline("facenet-sanderberg") run_baseline("facenet-sanderberg")
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv2_msceleb(): def test_inception_resnetv2_msceleb():
run_baseline("inception-resnetv2-msceleb") run_baseline("inception-resnetv2-msceleb")
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv2_casiawebface(): def test_inception_resnetv2_casiawebface():
run_baseline("inception-resnetv2-casiawebface") run_baseline("inception-resnetv2-casiawebface")
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv1_msceleb(): def test_inception_resnetv1_msceleb():
run_baseline("inception-resnetv1-msceleb") run_baseline("inception-resnetv1-msceleb")
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv1_casiawebface(): def test_inception_resnetv1_casiawebface():
run_baseline("inception-resnetv1-casiawebface") run_baseline("inception-resnetv1-casiawebface")
@attr('slow')
@is_library_available("mxnet") @is_library_available("mxnet")
def test_arcface_insightface(): def test_arcface_insightface():
run_baseline("arcface-insightface") run_baseline("arcface-insightface")
......
...@@ -4,8 +4,10 @@ import numpy as np ...@@ -4,8 +4,10 @@ import numpy as np
from bob.pipelines import Sample, wrap from bob.pipelines import Sample, wrap
import pkg_resources import pkg_resources
from bob.bio.base.test.utils import is_library_available from bob.bio.base.test.utils import is_library_available
from nose.plugins.attrib import attr
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_idiap_inceptionv2_msceleb(): def test_idiap_inceptionv2_msceleb():
from bob.bio.face.embeddings.tf2_inception_resnet import ( from bob.bio.face.embeddings.tf2_inception_resnet import (
...@@ -32,6 +34,7 @@ def test_idiap_inceptionv2_msceleb(): ...@@ -32,6 +34,7 @@ def test_idiap_inceptionv2_msceleb():
assert output.size == 128, output.shape assert output.size == 128, output.shape
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_idiap_inceptionv2_msceleb_memory_demanding(): def test_idiap_inceptionv2_msceleb_memory_demanding():
from bob.bio.face.embeddings.tf2_inception_resnet import ( from bob.bio.face.embeddings.tf2_inception_resnet import (
...@@ -59,6 +62,7 @@ def test_idiap_inceptionv2_msceleb_memory_demanding(): ...@@ -59,6 +62,7 @@ def test_idiap_inceptionv2_msceleb_memory_demanding():
assert output.size == 128, output.shape assert output.size == 128, output.shape
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_idiap_inceptionv2_casia(): def test_idiap_inceptionv2_casia():
from bob.bio.face.embeddings.tf2_inception_resnet import ( from bob.bio.face.embeddings.tf2_inception_resnet import (
...@@ -85,6 +89,7 @@ def test_idiap_inceptionv2_casia(): ...@@ -85,6 +89,7 @@ def test_idiap_inceptionv2_casia():
assert output.size == 128, output.shape assert output.size == 128, output.shape
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_idiap_inceptionv1_msceleb(): def test_idiap_inceptionv1_msceleb():
from bob.bio.face.embeddings.tf2_inception_resnet import ( from bob.bio.face.embeddings.tf2_inception_resnet import (
...@@ -111,6 +116,7 @@ def test_idiap_inceptionv1_msceleb(): ...@@ -111,6 +116,7 @@ def test_idiap_inceptionv1_msceleb():
assert output.size == 128, output.shape assert output.size == 128, output.shape
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_idiap_inceptionv1_casia(): def test_idiap_inceptionv1_casia():
from bob.bio.face.embeddings.tf2_inception_resnet import ( from bob.bio.face.embeddings.tf2_inception_resnet import (
...@@ -137,6 +143,7 @@ def test_idiap_inceptionv1_casia(): ...@@ -137,6 +143,7 @@ def test_idiap_inceptionv1_casia():
assert output.size == 128, output.shape assert output.size == 128, output.shape
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_facenet_sanderberg(): def test_facenet_sanderberg():
from bob.bio.face.embeddings.tf2_inception_resnet import ( from bob.bio.face.embeddings.tf2_inception_resnet import (
...@@ -163,6 +170,7 @@ def test_facenet_sanderberg(): ...@@ -163,6 +170,7 @@ def test_facenet_sanderberg():
assert output.size == 128, output.shape assert output.size == 128, output.shape
@attr('slow')
@is_library_available("mxnet") @is_library_available("mxnet")
def test_arcface_insight_face(): def test_arcface_insight_face():
from bob.bio.face.embeddings.mxnet_models import ArcFaceInsightFace from bob.bio.face.embeddings.mxnet_models import ArcFaceInsightFace
......
...@@ -4,6 +4,7 @@ import numpy as np ...@@ -4,6 +4,7 @@ import numpy as np
from bob.pipelines import Sample, SampleSet from bob.pipelines import Sample, SampleSet
from bob.bio.base import load_resource from bob.bio.base import load_resource
from bob.bio.base.test.utils import is_library_available from bob.bio.base.test.utils import is_library_available
from nose.plugins.attrib import attr
def get_fake_sample(face_size=(160, 160), eyes={"leye": (46, 107), "reye": (46, 53)}): def get_fake_sample(face_size=(160, 160), eyes={"leye": (46, 107), "reye": (46, 53)}):
...@@ -13,6 +14,7 @@ def get_fake_sample(face_size=(160, 160), eyes={"leye": (46, 107), "reye": (46, ...@@ -13,6 +14,7 @@ def get_fake_sample(face_size=(160, 160), eyes={"leye": (46, 107), "reye": (46,
return Sample(data, key="1", annotations=annotations) return Sample(data, key="1", annotations=annotations)
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_facenet_sanderberg(): def test_facenet_sanderberg():
transformer = load_resource("facenet-sanderberg", "transformer") transformer = load_resource("facenet-sanderberg", "transformer")
...@@ -24,6 +26,7 @@ def test_facenet_sanderberg(): ...@@ -24,6 +26,7 @@ def test_facenet_sanderberg():
assert transformed_sample.data.size == 128 assert transformed_sample.data.size == 128
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv2_msceleb(): def test_inception_resnetv2_msceleb():
transformer = load_resource("inception-resnetv2-msceleb", "transformer") transformer = load_resource("inception-resnetv2-msceleb", "transformer")
...@@ -35,6 +38,7 @@ def test_inception_resnetv2_msceleb(): ...@@ -35,6 +38,7 @@ def test_inception_resnetv2_msceleb():
assert transformed_sample.data.size == 128 assert transformed_sample.data.size == 128
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv2_casiawebface(): def test_inception_resnetv2_casiawebface():
transformer = load_resource("inception-resnetv2-casiawebface", "transformer") transformer = load_resource("inception-resnetv2-casiawebface", "transformer")
...@@ -46,6 +50,7 @@ def test_inception_resnetv2_casiawebface(): ...@@ -46,6 +50,7 @@ def test_inception_resnetv2_casiawebface():
assert transformed_sample.data.size == 128 assert transformed_sample.data.size == 128
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv1_msceleb(): def test_inception_resnetv1_msceleb():
transformer = load_resource("inception-resnetv1-msceleb", "transformer") transformer = load_resource("inception-resnetv1-msceleb", "transformer")
...@@ -57,6 +62,7 @@ def test_inception_resnetv1_msceleb(): ...@@ -57,6 +62,7 @@ def test_inception_resnetv1_msceleb():
assert transformed_sample.data.size == 128 assert transformed_sample.data.size == 128
@attr('slow')
@is_library_available("tensorflow") @is_library_available("tensorflow")
def test_inception_resnetv1_casiawebface(): def test_inception_resnetv1_casiawebface():
transformer = load_resource("inception-resnetv1-casiawebface", "transformer") transformer = load_resource("inception-resnetv1-casiawebface", "transformer")
......
Markdown is supported
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