File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
tensorflow_data_validation/anomalies Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ cc_library(
356356 deps = [
357357 ":map_util" ,
358358 ":path" ,
359+ "//third_party/tensorflow/tsl/platform:protobuf" ,
359360 "@com_github_tensorflow_metadata//tensorflow_metadata/proto/v0:metadata_v0_proto_cc_pb2" ,
360361 "@com_google_absl//absl/strings" ,
361362 "@com_google_absl//absl/types:optional" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ limitations under the License.
1616#include " tensorflow_data_validation/anomalies/test_util.h"
1717
1818#include < stddef.h>
19+
1920#include < string>
2021#include < utility>
2122#include < vector>
@@ -24,6 +25,7 @@ limitations under the License.
2425#include " absl/strings/str_cat.h"
2526#include " tensorflow_data_validation/anomalies/map_util.h"
2627#include " tensorflow_data_validation/anomalies/path.h"
28+ #include " tensorflow/tsl/platform/protobuf.h"
2729#include " tensorflow_metadata/proto/v0/anomalies.pb.h"
2830#include " tensorflow_metadata/proto/v0/schema.pb.h"
2931
@@ -35,7 +37,11 @@ using std::vector;
3537ProtoStringMatcher::ProtoStringMatcher (const string& expected)
3638 : expected_(expected) {}
3739ProtoStringMatcher::ProtoStringMatcher (const google::protobuf::Message& expected)
38- : expected_(expected.DebugString()) {}
40+ : expected_([&]() -> std::string {
41+ std::string result;
42+ tsl::protobuf::TextFormat::PrintToString (expected, &result);
43+ return result;
44+ }()) {}
3945
4046void TestAnomalies (
4147 const tensorflow::metadata::v0::Anomalies& actual,
You can’t perform that action at this time.
0 commit comments