dimanche 28 avril 2019

test_session (TestModelFn) Use cached_session instead. (deprecated)

I know that test_session is deprecated in tensorflow 1.13:

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use self.session() or self.cached_session() instead.

I created a unit test by only inheriting from tf.test.TestCase (which as I understand it is not deprecated?). I was careful not to explicitly call test_session:

class TestModelFn(tf.test.TestCase):

    def test_nothing(self):
        pass

However, when I run this test I see this:

test_nothing (the_thing.test.objective.cost_based.test_model.TestModelFn) ... ok
test_session (the_thing.test.objective.cost_based.test_model.TestModelFn)
Use cached_session instead. (deprecated) ... skipped 'Not a test.'

Why is this happening? I'm using tensorflow 1.13.1.

Aucun commentaire:

Enregistrer un commentaire