From dd919053e7d3e7fddc2dd8e8abccdd74d259a7a1 Mon Sep 17 00:00:00 2001 From: "TF.Text Team" Date: Sun, 23 Jun 2024 18:40:36 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 645935675 --- .../kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc | 2 +- .../kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc index 5bcf2651e..cb26462c5 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc @@ -68,7 +68,7 @@ class TFSentencepieceDetokenizerOp : public tensorflow::OpKernel { const auto res = sentencepiece::DecodeString( codes_for_split, model_tensor.data()); OP_REQUIRES(ctx, res.type == sentencepiece::DecoderResultType::SUCCESS, - tensorflow::Status(static_cast( + tensorflow::Status(static_cast( absl::StatusCode::kInternal), "Sentencepiece conversion failed")); output_flat(i) = res.decoded; diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc index 4d8750ca8..bd62f2ffc 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc @@ -65,7 +65,7 @@ class TFSentencepieceOp : public tensorflow::OpKernel { const auto res = sentencepiece::EncodeString( input_values_flat(i), model_tensor.data(), add_bos, add_eos, reverse); OP_REQUIRES(ctx, res.type == sentencepiece::EncoderResultType::SUCCESS, - tensorflow::Status(static_cast( + tensorflow::Status(static_cast( absl::StatusCode::kInternal), "Sentencepiece conversion failed")); std::copy(res.codes.begin(), res.codes.end(),