diff --git a/WORKSPACE b/WORKSPACE index e14473e50..6675acba1 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -10,12 +10,11 @@ bind( http_archive( name = "bazel_skylib", - type = "tar.gz", + sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506", urls = [ - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", ], - sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", ) load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() @@ -455,9 +454,9 @@ http_archive( ) # TensorFlow repo should always go after the other external dependencies. -# TF on 2022-08-10. -_TENSORFLOW_GIT_COMMIT = "af1d5bc4fbb66d9e6cc1cf89503014a99233583b" -_TENSORFLOW_SHA256 = "f85a5443264fc58a12d136ca6a30774b5bc25ceaf7d114d97f252351b3c3a2cb" +# TF on 2023-02-02. +_TENSORFLOW_GIT_COMMIT = "581840e12c7762a3deef66b25a549218ca1e3983" +_TENSORFLOW_SHA256 = "27f8f51e34b5065ac5411332eb4ad02f1d954257036d4863810d0c394d044bc9" http_archive( name = "org_tensorflow", urls = [ diff --git a/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc b/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc index 71f7b1f2d..a175f218d 100644 --- a/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc +++ b/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc @@ -251,13 +251,8 @@ TEST_F(TextClassifierTest, BertLongPositive) { TextClassifierResult expected; std::vector categories; -// Predicted scores are slightly different across platforms. -#ifdef __APPLE__ - categories.push_back( - {/*index=*/1, /*score=*/0.974181, /*category_name=*/"positive"}); - categories.push_back( - {/*index=*/0, /*score=*/0.025819, /*category_name=*/"negative"}); -#elif defined _WIN32 +// Predicted scores are slightly different on Windows. +#ifdef _WIN32 categories.push_back( {/*index=*/1, /*score=*/0.976686, /*category_name=*/"positive"}); categories.push_back( @@ -267,7 +262,7 @@ TEST_F(TextClassifierTest, BertLongPositive) { {/*index=*/1, /*score=*/0.985889, /*category_name=*/"positive"}); categories.push_back( {/*index=*/0, /*score=*/0.014112, /*category_name=*/"negative"}); -#endif // __APPLE__ +#endif // _WIN32 expected.classifications.emplace_back( Classifications{/*categories=*/categories, diff --git a/third_party/org_tensorflow_compatibility_fixes.diff b/third_party/org_tensorflow_compatibility_fixes.diff index 1d74d45a9..fa508209e 100644 --- a/third_party/org_tensorflow_compatibility_fixes.diff +++ b/third_party/org_tensorflow_compatibility_fixes.diff @@ -1,7 +1,7 @@ -diff --git a/tensorflow/core/lib/monitoring/percentile_sampler.cc b/tensorflow/core/lib/monitoring/percentile_sampler.cc +diff --git a/tensorflow/tsl/lib/monitoring/percentile_sampler.cc b/tensorflow/tsl/lib/monitoring/percentile_sampler.cc index b7c22ae77ba..d0ba7b48b4b 100644 ---- a/tensorflow/core/lib/monitoring/percentile_sampler.cc -+++ b/tensorflow/core/lib/monitoring/percentile_sampler.cc +--- a/tensorflow/tsl/lib/monitoring/percentile_sampler.cc ++++ b/tensorflow/tsl/lib/monitoring/percentile_sampler.cc @@ -29,7 +29,8 @@ namespace monitoring { void PercentileSamplerCell::Add(double sample) { uint64 nstime = EnvTime::NowNanos(); @@ -23,18 +23,6 @@ index b7c22ae77ba..d0ba7b48b4b 100644 pct_samples.points.push_back(pct); } } -diff --git a/tensorflow/core/platform/test.h b/tensorflow/core/platform/test.h -index b598b6ee1e4..51c013a2d62 100644 ---- a/tensorflow/core/platform/test.h -+++ b/tensorflow/core/platform/test.h -@@ -40,7 +40,6 @@ limitations under the License. - // better error messages, more maintainable tests and more test coverage. - #if !defined(PLATFORM_GOOGLE) && !defined(PLATFORM_GOOGLE_ANDROID) && \ - !defined(PLATFORM_CHROMIUMOS) --#include - #include - #include - #endif diff --git a/third_party/eigen3/eigen_archive.BUILD b/third_party/eigen3/eigen_archive.BUILD index 5514f774c35..1a38f76f4e9 100644 --- a/third_party/eigen3/eigen_archive.BUILD