Commit 2350cff5 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge branch 'add-slow-attr' into 'master'

Added @attr(slow) for slow tests

See merge request !81
parents e825af8b b1a034e5
Pipeline #35442 passed with stages
in 283 minutes and 6 seconds
......@@ -2,12 +2,13 @@
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
from nose.plugins.attrib import attr
import tensorflow as tf
from bob.learn.tensorflow.network import inception_resnet_v2, inception_resnet_v2_batch_norm,\
inception_resnet_v1, inception_resnet_v1_batch_norm,\
vgg_19, vgg_16, mlp_with_batchnorm_and_dropout
@attr('slow')
def test_inceptionv2():
tf.reset_default_graph()
......@@ -27,7 +28,7 @@ def test_inceptionv2():
tf.reset_default_graph()
assert len(tf.global_variables()) == 0
@attr('slow')
def test_inceptionv2_adaptation():
tf.reset_default_graph()
......@@ -52,7 +53,7 @@ def test_inceptionv2_adaptation():
tf.reset_default_graph()
assert len(tf.global_variables()) == 0
@attr('slow')
def test_inceptionv1():
tf.reset_default_graph()
......@@ -72,7 +73,7 @@ def test_inceptionv1():
tf.reset_default_graph()
assert len(tf.global_variables()) == 0
@attr('slow')
def test_inceptionv1_adaptation():
tf.reset_default_graph()
......
......@@ -2,6 +2,7 @@
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
from nose.plugins.attrib import attr
import tensorflow as tf
from bob.learn.tensorflow.network import dummy
......@@ -36,7 +37,7 @@ epochs = 6
steps = 5000
reproducible.set_seed()
@attr('slow')
def test_logitstrainer():
# Trainer logits
try:
......@@ -62,7 +63,7 @@ def test_logitstrainer():
except Exception:
pass
@attr('slow')
def test_logitstrainer_embedding():
try:
embedding_validation = True
......@@ -86,7 +87,7 @@ def test_logitstrainer_embedding():
except Exception:
pass
@attr('slow')
def test_logitstrainer_centerloss():
try:
embedding_validation = False
......@@ -123,7 +124,7 @@ def test_logitstrainer_centerloss():
except Exception:
pass
@attr('slow')
def test_logitstrainer_centerloss_embedding():
try:
embedding_validation = True
......@@ -219,7 +220,7 @@ def run_logitstrainer_mnist(trainer, augmentation=False):
tf.reset_default_graph()
assert len(tf.global_variables()) == 0
@attr('slow')
def test_moving_average_trainer():
# define a fixed input data
# train the same network with the same initialization
......@@ -305,7 +306,7 @@ def test_moving_average_trainer():
except Exception:
pass
@attr('slow')
def test_saver_with_moving_average():
try:
_, run_config, _, _, _ = reproducible.set_seed()
......
......@@ -12,6 +12,7 @@ from bob.learn.tensorflow.script.train import train
from bob.learn.tensorflow.script.eval import eval as eval_script
from bob.learn.tensorflow.script.train_and_evaluate import train_and_evaluate
from bob.learn.tensorflow.script.predict_bio import predict_bio
from nose.plugins.attrib import attr
db_to_tfrecords_config = datafile('db_to_tfrecords_config.py', __name__)
......@@ -83,7 +84,7 @@ def _predict_bio(tmpdir, model_dir, tfrecord_path, extra_options=tuple()):
predict_bio,
args=[config_path, input_predict_bio_config] + list(extra_options))
@attr('slow')
def test_eval():
tmpdir = mkdtemp(prefix='bob_')
try:
......@@ -116,7 +117,7 @@ def test_eval():
except Exception:
pass
@attr('slow')
def test_eval_keep_n_model():
tmpdir = mkdtemp(prefix='bob_')
try:
......@@ -147,7 +148,7 @@ def test_eval_keep_n_model():
except Exception:
pass
@attr('slow')
def test_predict_bio():
tmpdir = mkdtemp(prefix='bob_')
try:
......@@ -167,7 +168,7 @@ def test_predict_bio():
except Exception:
pass
@attr('slow')
def test_predict_bio_empty_eval():
tmpdir = mkdtemp(prefix='bob_')
try:
......
......@@ -2,6 +2,7 @@
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
from nose.plugins.attrib import attr
import tensorflow as tf
from bob.learn.tensorflow.network import dummy
......@@ -78,7 +79,7 @@ filenames = [
]
labels = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
@attr('slow')
def test_siamesetrainer():
# Trainer logits
try:
......@@ -102,7 +103,7 @@ def test_siamesetrainer():
except Exception:
pass
@attr('slow')
def test_siamesetrainer_transfer():
def logits_input_fn():
return single_batch(
......@@ -157,7 +158,7 @@ def test_siamesetrainer_transfer():
except Exception:
pass
@attr('slow')
def test_siamesetrainer_transfer_extraparams():
def logits_input_fn():
return single_batch(
......
......@@ -2,6 +2,7 @@
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
from nose.plugins.attrib import attr
import tensorflow as tf
from bob.learn.tensorflow.network import dummy
......@@ -80,7 +81,7 @@ def dummy_adapted(inputs,
return graph, end_points
@attr('slow')
def test_logitstrainer():
# Trainer logits
try:
......@@ -130,7 +131,7 @@ def test_logitstrainer():
except Exception:
pass
@attr('slow')
def test_logitstrainer_center_loss():
# Trainer logits
try:
......
......@@ -2,6 +2,7 @@
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
from nose.plugins.attrib import attr
import tensorflow as tf
from bob.learn.tensorflow.network import dummy
......@@ -76,7 +77,7 @@ filenames = [
]
labels = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
@attr('slow')
def test_triplet_estimator():
# Trainer logits
try:
......@@ -94,7 +95,7 @@ def test_triplet_estimator():
except Exception:
pass
@attr('slow')
def test_triplettrainer_transfer():
def logits_input_fn():
return single_batch(
......
from nose.plugins.attrib import attr
from bob.learn.tensorflow.estimators import Regressor
from tensorflow import keras
import tensorflow as tf
import tensorflow.contrib.slim as slim
@attr('slow')
def test_regressor():
boston_housing = keras.datasets.boston_housing
......
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