Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 645935675
  • Loading branch information
tf-text-github-robot committed Jun 24, 2024
1 parent 272d08b commit dd91905
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<tsl::errors::Code>(
tensorflow::Status(static_cast<absl::StatusCode>(
absl::StatusCode::kInternal),
"Sentencepiece conversion failed"));
output_flat(i) = res.decoded;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<tsl::errors::Code>(
tensorflow::Status(static_cast<absl::StatusCode>(
absl::StatusCode::kInternal),
"Sentencepiece conversion failed"));
std::copy(res.codes.begin(), res.codes.end(),
Expand Down

0 comments on commit dd91905

Please sign in to comment.