Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 684384521
  • Loading branch information
tensorflower-gardener authored and tflite-support-robot committed Oct 10, 2024
1 parent 0108ae4 commit ebb89b6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ namespace sentencepiece {

namespace internal {

tensorflow::Status TFReadFileToString(const std::string& filepath,
std::string* data) {
absl::Status TFReadFileToString(const std::string& filepath,
std::string* data) {
return tensorflow::ReadFileToString(tensorflow::Env::Default(), filepath,
data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ namespace sentencepiece {

namespace internal {

tensorflow::Status TFReadFileToString(const std::string& filepath,
std::string* data) {
absl::Status TFReadFileToString(const std::string& filepath,
std::string* data) {
return tensorflow::ReadFileToString(tensorflow::Env::Default(), filepath,
data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ class TFSentencepieceDetokenizerOp : public tensorflow::OpKernel {
ctx,
res.type ==
tflite::ops::custom::sentencepiece::DecoderResultType::SUCCESS,
tensorflow::Status(static_cast<tensorflow::errors::Code>(
tensorflow::error::INTERNAL),
"Sentencepiece conversion failed"));
absl::Status(
static_cast<absl::StatusCode>(tensorflow::error::INTERNAL),
"Sentencepiece conversion failed"));
output_flat(i) = res.decoded;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class TFSentencepieceOp : public tensorflow::OpKernel {
ctx,
res.type ==
::tflite::ops::custom::sentencepiece::EncoderResultType::SUCCESS,
tensorflow::Status(static_cast<tensorflow::errors::Code>(
tensorflow::error::INTERNAL),
"Sentencepiece conversion failed"));
absl::Status(
static_cast<absl::StatusCode>(tensorflow::error::INTERNAL),
"Sentencepiece conversion failed"));
std::copy(res.codes.begin(), res.codes.end(),
std::back_inserter(encoded));
splits.emplace_back(encoded.size());
Expand Down

0 comments on commit ebb89b6

Please sign in to comment.