Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 610211777
  • Loading branch information
tensorflower-gardener authored and tensorflow-copybara committed Feb 25, 2024
1 parent 27923d3 commit 704e250
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tensorflow_serving/util/prometheus_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ PrometheusExporter::PrometheusExporter()
Status PrometheusExporter::GeneratePage(string* http_page) {
if (http_page == nullptr) {
return Status(
static_cast<tsl::errors::Code>(absl::StatusCode::kInvalidArgument),
static_cast<absl::StatusCode>(absl::StatusCode::kInvalidArgument),
"Http page pointer is null");
}
monitoring::CollectionRegistry::CollectMetricsOptions collect_options;
Expand All @@ -186,7 +186,7 @@ Status PrometheusExporter::GeneratePage(string* http_page) {
}
*http_page = absl::StrJoin(lines, "\n");
absl::StrAppend(http_page, "\n");
return OkStatus();
return absl::OkStatus();
}

} // namespace serving
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/util/status_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ StatusProto ToStatusProto(const Status& status) {
Status FromStatusProto(const StatusProto& status_proto) {
return status_proto.error_code() == tensorflow::error::OK
? Status()
: Status(static_cast<tsl::errors::Code>(status_proto.error_code()),
: Status(static_cast<absl::StatusCode>(status_proto.error_code()),
status_proto.error_message());
}

Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/util/status_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace {

TEST(StatusUtilTest, ConvertsErrorStatusToStatusProto) {
Status status =
Status(static_cast<tsl::errors::Code>(absl::StatusCode::kAborted),
Status(static_cast<absl::StatusCode>(absl::StatusCode::kAborted),
"aborted error message");
StatusProto status_proto = ToStatusProto(status);
EXPECT_EQ(tensorflow::error::ABORTED, status_proto.error_code());
Expand Down

0 comments on commit 704e250

Please sign in to comment.