Skip to content

Commit bae5833

Browse files
No public description
PiperOrigin-RevId: 738680325
1 parent a93de7d commit bae5833

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ class TFSentencepieceDetokenizerOp : public tensorflow::OpKernel {
6868
const auto res = sentencepiece::DecodeString(
6969
codes_for_split, model_tensor.data());
7070
OP_REQUIRES(ctx, res.type == sentencepiece::DecoderResultType::SUCCESS,
71-
tensorflow::Status(static_cast<absl::StatusCode>(
72-
absl::StatusCode::kInternal),
73-
"Sentencepiece conversion failed"));
71+
absl::Status(static_cast<absl::StatusCode>(
72+
absl::StatusCode::kInternal),
73+
"Sentencepiece conversion failed"));
7474
output_flat(i) = res.decoded;
7575
}
7676
}

tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ class TFSentencepieceOp : public tensorflow::OpKernel {
6565
const auto res = sentencepiece::EncodeString(
6666
input_values_flat(i), model_tensor.data(), add_bos, add_eos, reverse);
6767
OP_REQUIRES(ctx, res.type == sentencepiece::EncoderResultType::SUCCESS,
68-
tensorflow::Status(static_cast<absl::StatusCode>(
69-
absl::StatusCode::kInternal),
70-
"Sentencepiece conversion failed"));
68+
absl::Status(static_cast<absl::StatusCode>(
69+
absl::StatusCode::kInternal),
70+
"Sentencepiece conversion failed"));
7171
std::copy(res.codes.begin(), res.codes.end(),
7272
std::back_inserter(encoded));
7373
splits.emplace_back(encoded.size());

0 commit comments

Comments
 (0)