Skip to content

Commit

Permalink
[UT][CIBUILD] Fix UT, enable embedding_variable_ops_test UT. (DeepRec…
Browse files Browse the repository at this point in the history
  • Loading branch information
candyzone authored Nov 8, 2021
1 parent 4794178 commit 766f394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion cibuild/cpu-ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export TF_BUILD_BAZEL_TARGET="$TF_BUILD_BAZEL_TARGET "\
"-//tensorflow/python/distribute:values_test "\
"-//tensorflow/python/distribute:parameter_server_strategy_test "\
"-//tensorflow/python/eager:remote_test "\
"-//tensorflow/python:embedding_variable_ops_test "\
"-//tensorflow/python/keras/distribute:multi_worker_fault_tolerance_test "\
"-//tensorflow/python/keras:callbacks_test "\
"-//tensorflow/python/keras:core_test "\
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/python/ops/embedding_variable_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def testEmbeddingVariableForLookupInt32(self):

def testEmbeddingVariableForExport(self):
print("testEmbeddingVariableForExport")
ev_config = variables.EVConfig(filter_freq=1)
ev_config = variables.EVConfig(counter_filter_strategy=variables.CounterFilterStrategy(filter_freq=1))
var = variable_scope.get_embedding_variable("var_1", embedding_dim=3,
initializer=init_ops.ones_initializer(dtypes.float32), steps_to_live=10000, ev=ev_config)
emb = embedding_ops.embedding_lookup(var, math_ops.cast([0,1,2,5,6,7], dtypes.int64))
Expand Down Expand Up @@ -913,7 +913,7 @@ def runTestAdam(self, var):
print(emb2.tolist())
for i in range(0, 6):
for j in range(0, 3):
self.assertEqual(emb1.tolist()[i][j], emb2.tolist()[i][j])
self.assertAlmostEqual(emb1.tolist()[i][j], emb2.tolist()[i][j], delta=1e-05)

def testEmbeddingVariableForAdamAsync(self):
print("testEmbeddingVariableForAdamAsync")
Expand Down

0 comments on commit 766f394

Please sign in to comment.