Skip to content

Commit 559cc0b

Browse files
jblespiautensorflow-copybara
authored andcommitted
Change tensorflow::Status to be absl::Status.
PiperOrigin-RevId: 527394876
1 parent 34773c3 commit 559cc0b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

research/carls/testing/test_helper.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ std::string GetErrorMessage(const grpc::Status& status) {
3434
return status.error_message();
3535
}
3636

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

0 commit comments

Comments
 (0)