From d8d1544e1d315b2aec155409cee7d3cf36ab4562 Mon Sep 17 00:00:00 2001 From: "TF.Text Team" Date: Thu, 29 Feb 2024 12:24:50 -0800 Subject: [PATCH] No public description PiperOrigin-RevId: 611557924 --- tensorflow_text/core/kernels/sentencepiece/BUILD | 2 -- .../core/kernels/sentencepiece/optimized_decoder_test.cc | 4 +--- .../core/kernels/sentencepiece/optimized_encoder_test.cc | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tensorflow_text/core/kernels/sentencepiece/BUILD b/tensorflow_text/core/kernels/sentencepiece/BUILD index edeaaa8c0..d51117ee2 100644 --- a/tensorflow_text/core/kernels/sentencepiece/BUILD +++ b/tensorflow_text/core/kernels/sentencepiece/BUILD @@ -250,7 +250,6 @@ cc_test( "//file/base:path", "//file/localfile", "@com_google_googletest//:gtest_main", - "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/status", "@com_google_absl//absl/strings:str_format", "@com_google_sentencepiece//:sentencepiece_cc_proto", @@ -274,7 +273,6 @@ cc_test( "//file/base:path", "//file/localfile", "@com_google_googletest//:gtest_main", - "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/strings:str_format", "@com_google_sentencepiece//:sentencepiece_cc_proto", "@com_google_sentencepiece//:sentencepiece_processor", diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc index 9d4093354..178e52228 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc @@ -34,7 +34,6 @@ limitations under the License. #include "file/base/path.h" #include #include -#include "absl/flags/flag.h" #include "absl/strings/str_format.h" #include "src/sentencepiece.proto.h" #include "src/sentencepiece_processor.h" @@ -80,8 +79,7 @@ TEST(OptimizedEncoder, ConfigConverter) { std::string config; auto status = internal::TFReadFileToString( - file::JoinPath(absl::GetFlag(FLAGS_test_srcdir), kConfigFilePath), - &config); + file::JoinPath(::testing::SrcDir(), kConfigFilePath), &config); ASSERT_TRUE(status.ok()); ::sentencepiece::SentencePieceProcessor processor; diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc index a9b089b41..bee155c38 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc @@ -34,7 +34,6 @@ limitations under the License. #include "file/base/path.h" #include #include -#include "absl/flags/flag.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "src/sentencepiece.proto.h" @@ -162,8 +161,7 @@ TEST(OptimizedEncoder, NormalizeStringWhitespacesRemove) { TEST(OptimizedEncoder, ConfigConverter) { std::string config; auto status = internal::TFReadFileToString( - file::JoinPath(absl::GetFlag(FLAGS_test_srcdir), kConfigFilePath), - &config); + file::JoinPath(::testing::SrcDir(), kConfigFilePath), &config); ASSERT_TRUE(status.ok()); ::sentencepiece::SentencePieceProcessor processor;