Skip to content

Commit

Permalink
Change tensorflow::Status to be absl::Status.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 527394876
  • Loading branch information
jblespiau authored and tensorflow-copybara committed Apr 26, 2023
1 parent 34773c3 commit 559cc0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion research/carls/testing/test_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ std::string GetErrorMessage(const grpc::Status& status) {
return status.error_message();
}

template <>
// Starting from TF 2.13, `tensorflow::Status` will be an alias to
// `absl::Status`, thus, we don't define the specialization in that case.
template <class T,
std::enable_if_t<!std::is_same<T, absl::Status>::value, bool> = true>
std::string GetErrorMessage(const tensorflow::Status& status) {
// On April 2023, there is not yet an official release of Tensorflow which
// includes `message().` One will need to wait for the release following 2.12.0.
Expand Down

0 comments on commit 559cc0b

Please sign in to comment.