Update run_v1_only tests with proper reasons.
PiperOrigin-RevId: 322386004 Change-Id: I9b292be8ce51118f6537853c14a22da748fcea9d
This commit is contained in:
parent
0850be02ff
commit
ba990dd7e8
@ -89,7 +89,8 @@ class SyncReplicasOptimizerTest(test.TestCase):
|
|||||||
def _run(self, train_op, sess):
|
def _run(self, train_op, sess):
|
||||||
sess.run(train_op)
|
sess.run(train_op)
|
||||||
|
|
||||||
@test_util.run_v1_only("b/120545219")
|
@test_util.run_v1_only(
|
||||||
|
"This exercises tensor lookup via names which is not supported in V2.")
|
||||||
def test2Workers(self):
|
def test2Workers(self):
|
||||||
num_workers = 2
|
num_workers = 2
|
||||||
replicas_to_aggregate = 2
|
replicas_to_aggregate = 2
|
||||||
@ -180,7 +181,8 @@ class SyncReplicasOptimizerTest(test.TestCase):
|
|||||||
sessions[1].run(var_1_g_1))
|
sessions[1].run(var_1_g_1))
|
||||||
|
|
||||||
# 3 workers and one of them is backup.
|
# 3 workers and one of them is backup.
|
||||||
@test_util.run_v1_only("b/120545219")
|
@test_util.run_v1_only(
|
||||||
|
"This exercises tensor lookup via names which is not supported in V2.")
|
||||||
def test3Workers1Backup(self):
|
def test3Workers1Backup(self):
|
||||||
num_workers = 3
|
num_workers = 3
|
||||||
replicas_to_aggregate = 2
|
replicas_to_aggregate = 2
|
||||||
@ -268,7 +270,9 @@ class SyncReplicasOptimizerHookTest(test.TestCase):
|
|||||||
with self.assertRaisesRegex(ValueError, "apply_gradient should be called"):
|
with self.assertRaisesRegex(ValueError, "apply_gradient should be called"):
|
||||||
hook.begin()
|
hook.begin()
|
||||||
|
|
||||||
@test_util.run_v1_only("b/120545219")
|
@test_util.run_v1_only(
|
||||||
|
"train.SyncReplicasOptimizer and train.GradientDescentOptimizer "
|
||||||
|
"are V1 only APIs.")
|
||||||
def testCanCreatedBeforeMinimizeCalled(self):
|
def testCanCreatedBeforeMinimizeCalled(self):
|
||||||
"""This behavior is required to be integrated with Estimators."""
|
"""This behavior is required to be integrated with Estimators."""
|
||||||
opt = training.SyncReplicasOptimizer(
|
opt = training.SyncReplicasOptimizer(
|
||||||
@ -281,7 +285,8 @@ class SyncReplicasOptimizerHookTest(test.TestCase):
|
|||||||
opt.minimize(v, global_step=global_step)
|
opt.minimize(v, global_step=global_step)
|
||||||
hook.begin()
|
hook.begin()
|
||||||
|
|
||||||
@test_util.run_v1_only("b/120545219")
|
@test_util.run_v1_only(
|
||||||
|
"train.SyncReplicasOptimizer and train.AdamOptimizer are V1 only APIs.")
|
||||||
def testFetchVariableList(self):
|
def testFetchVariableList(self):
|
||||||
opt = training.SyncReplicasOptimizer(
|
opt = training.SyncReplicasOptimizer(
|
||||||
opt=adam.AdamOptimizer(0.01),
|
opt=adam.AdamOptimizer(0.01),
|
||||||
|
Loading…
Reference in New Issue
Block a user