Skip to content

Commit 767dfc8

Browse files
No public description
PiperOrigin-RevId: 646431002
1 parent dd91905 commit 767dfc8

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

tensorflow_text/core/kernels/sentencepiece_kernels.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct SentencepieceResource : public ResourceBase {
8383
.WithName(unique_node_name)
8484
.WithAttr("model", model)
8585
.WithAttr("use_node_name_sharing", true));
86-
return OkStatus();
86+
return absl::OkStatus();
8787
}
8888
};
8989

@@ -133,13 +133,13 @@ tensorflow::Status HandleExtraOptions(OpKernelContext* ctx,
133133
// the reader lock once and do a quick check first.
134134
absl::ReaderMutexLock l(&sp->mu);
135135
if (sp->SameOptions(add_bos, add_eos, reverse)) {
136-
return OkStatus();
136+
return absl::OkStatus();
137137
}
138138
}
139139

140140
absl::WriterMutexLock lock(&sp->mu);
141141
if (sp->SameOptions(add_bos, add_eos, reverse)) {
142-
return OkStatus();
142+
return absl::OkStatus();
143143
}
144144
string options;
145145
sp->add_bos = add_bos;
@@ -164,7 +164,7 @@ tensorflow::Status HandleExtraOptions(OpKernelContext* ctx,
164164
TF_RETURN_IF_ERROR(ToTFStatus(sp->processor.SetEncodeExtraOptions(options)));
165165
TF_RETURN_IF_ERROR(ToTFStatus(sp->processor.SetDecodeExtraOptions(options)));
166166

167-
return OkStatus();
167+
return absl::OkStatus();
168168
}
169169

170170
} // namespace
@@ -227,7 +227,7 @@ class SentencepieceOp : public OpKernel {
227227
}
228228

229229
*resource = sp;
230-
return OkStatus();
230+
return absl::OkStatus();
231231
};
232232

233233
// Register the ResourceType alias.

tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Status TokenizeByLabel(const absl::string_view& text,
110110
last_character_is_break_character = is_break_character;
111111
}
112112

113-
return OkStatus();
113+
return absl::OkStatus();
114114
}
115115

116116
} // namespace

tensorflow_text/core/kernels/tokenizer_from_logits_kernel.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ Status TokenizeByLogits(const absl::string_view& text,
7878
std::vector<absl::string_view> chars;
7979
if (!GetUTF8Chars(text, &chars)) {
8080
return Status(
81-
static_cast<tsl::errors::Code>(absl::StatusCode::kInvalidArgument),
81+
static_cast<absl::StatusCode>(absl::StatusCode::kInvalidArgument),
8282
absl::StrCat("Input string is not utf8 valid: ", text));
8383
}
8484

8585
if (chars.size() > logits.dimension(1)) {
8686
return Status(
87-
static_cast<tsl::errors::Code>(absl::StatusCode::kInvalidArgument),
87+
static_cast<absl::StatusCode>(absl::StatusCode::kInvalidArgument),
8888
absl::StrCat("Number of logits, ", logits.dimension(1),
8989
", is insufficient for text \"", text, "\""));
9090
}
@@ -116,7 +116,7 @@ Status TokenizeByLogits(const absl::string_view& text,
116116
last_character_is_break_character = is_break_character;
117117
}
118118

119-
return OkStatus();
119+
return absl::OkStatus();
120120
}
121121

122122
} // namespace

tensorflow_text/core/kernels/wordpiece_kernel.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Status GetTableHandle(const string& input_name, OpKernelContext* ctx,
9999
*container = h(0);
100100
*table_handle = h(1);
101101
}
102-
return OkStatus();
102+
return absl::OkStatus();
103103
}
104104

105105
// Gets the LookupTable stored in the ctx->resource_manager() with key
@@ -137,7 +137,7 @@ class LookupTableVocab : public WordpieceVocab {
137137

138138
Status ToStatus(const LookupStatus& status) {
139139
if (status.success) {
140-
return OkStatus();
140+
return absl::OkStatus();
141141
}
142142

143143
return errors::InvalidArgument(status.error_msg);

0 commit comments

Comments
 (0)