Skip to content

Commit ebb89b6

Browse files
Automated Code Change
PiperOrigin-RevId: 684384521
1 parent 0108ae4 commit ebb89b6

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

‎tensorflow_lite_support/custom_ops/kernel/sentencepiece/optimized_decoder_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ namespace sentencepiece {
3333

3434
namespace internal {
3535

36-
tensorflow::Status TFReadFileToString(const std::string& filepath,
37-
std::string* data) {
36+
absl::Status TFReadFileToString(const std::string& filepath,
37+
std::string* data) {
3838
return tensorflow::ReadFileToString(tensorflow::Env::Default(), filepath,
3939
data);
4040
}

‎tensorflow_lite_support/custom_ops/kernel/sentencepiece/optimized_encoder_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ namespace sentencepiece {
3636

3737
namespace internal {
3838

39-
tensorflow::Status TFReadFileToString(const std::string& filepath,
40-
std::string* data) {
39+
absl::Status TFReadFileToString(const std::string& filepath,
40+
std::string* data) {
4141
return tensorflow::ReadFileToString(tensorflow::Env::Default(), filepath,
4242
data);
4343
}

‎tensorflow_lite_support/custom_ops/kernel/sentencepiece/sentencepiece_detokenizer_op.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ class TFSentencepieceDetokenizerOp : public tensorflow::OpKernel {
7373
ctx,
7474
res.type ==
7575
tflite::ops::custom::sentencepiece::DecoderResultType::SUCCESS,
76-
tensorflow::Status(static_cast<tensorflow::errors::Code>(
77-
tensorflow::error::INTERNAL),
78-
"Sentencepiece conversion failed"));
76+
absl::Status(
77+
static_cast<absl::StatusCode>(tensorflow::error::INTERNAL),
78+
"Sentencepiece conversion failed"));
7979
output_flat(i) = res.decoded;
8080
}
8181
}

‎tensorflow_lite_support/custom_ops/kernel/sentencepiece/sentencepiece_tokenizer_op.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ class TFSentencepieceOp : public tensorflow::OpKernel {
8686
ctx,
8787
res.type ==
8888
::tflite::ops::custom::sentencepiece::EncoderResultType::SUCCESS,
89-
tensorflow::Status(static_cast<tensorflow::errors::Code>(
90-
tensorflow::error::INTERNAL),
91-
"Sentencepiece conversion failed"));
89+
absl::Status(
90+
static_cast<absl::StatusCode>(tensorflow::error::INTERNAL),
91+
"Sentencepiece conversion failed"));
9292
std::copy(res.codes.begin(), res.codes.end(),
9393
std::back_inserter(encoded));
9494
splits.emplace_back(encoded.size());

0 commit comments

Comments
 (0)