Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 572722787
  • Loading branch information
schmidt-sebastian authored and copybara-github committed Oct 11, 2023
1 parent dd29666 commit a97eaad
Show file tree
Hide file tree
Showing 10 changed files with 922 additions and 59 deletions.
12 changes: 5 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,14 @@ http_archive(
# sentencepiece
http_archive(
name = "com_google_sentencepiece",
strip_prefix = "sentencepiece-1.0.0",
sha256 = "c05901f30a1d0ed64cbcf40eba08e48894e1b0e985777217b7c9036cac631346",
strip_prefix = "sentencepiece-0.1.96",
sha256 = "8409b0126ebd62b256c685d5757150cf7fcb2b92a2f2b98efb3f38fc36719754",
urls = [
"https://github.com/google/sentencepiece/archive/1.0.0.zip",
],
patches = [
"@//third_party:com_google_sentencepiece_no_gflag_no_gtest.diff",
"https://github.com/google/sentencepiece/archive/refs/tags/v0.1.96.zip"
],
build_file = "@//third_party:sentencepiece.BUILD",
patches = ["@//third_party:com_google_sentencepiece.diff"],
patch_args = ["-p1"],
repo_mapping = {"@com_google_glog" : "@com_github_glog_glog_no_gflags"},
)

http_archive(
Expand Down
4 changes: 2 additions & 2 deletions mediapipe/calculators/tensor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ cc_test(
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_sentencepiece//src:sentencepiece_processor", # fixdeps: keep
"@com_google_sentencepiece//:sentencepiece_processor", # fixdeps: keep
],
)

Expand Down Expand Up @@ -303,7 +303,7 @@ cc_test(
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_sentencepiece//src:sentencepiece_processor", # fixdeps: keep
"@com_google_sentencepiece//:sentencepiece_processor", # fixdeps: keep
],
)

Expand Down
11 changes: 3 additions & 8 deletions mediapipe/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ cc_library(
deps = [
"//mediapipe/tasks/cc/audio/audio_classifier:audio_classifier_graph",
"//mediapipe/tasks/cc/audio/audio_embedder:audio_embedder_graph",
"//mediapipe/tasks/cc/text/text_classifier:text_classifier_graph",
"//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph",
"//mediapipe/tasks/cc/vision/face_detector:face_detector_graph",
"//mediapipe/tasks/cc/vision/face_landmarker:face_landmarker_graph",
"//mediapipe/tasks/cc/vision/face_stylizer:face_stylizer_graph",
Expand All @@ -101,14 +103,7 @@ cc_library(
"//mediapipe/tasks/cc/vision/interactive_segmenter:interactive_segmenter_graph",
"//mediapipe/tasks/cc/vision/object_detector:object_detector_graph",
"//mediapipe/tasks/cc/vision/pose_landmarker:pose_landmarker_graph",
] + select({
# TODO: Build text_classifier_graph and text_embedder_graph on Windows.
"//mediapipe:windows": [],
"//conditions:default": [
"//mediapipe/tasks/cc/text/text_classifier:text_classifier_graph",
"//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph",
],
}),
],
)

py_library(
Expand Down
6 changes: 3 additions & 3 deletions mediapipe/tasks/cc/text/custom_ops/sentencepiece/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ cc_library(
":sentencepiece_constants",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_sentencepiece//src:sentencepiece_model_cc_proto",
"@com_google_sentencepiece//:sentencepiece_model_cc_proto",
],
)

Expand Down Expand Up @@ -165,8 +165,8 @@ cc_test(
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings:str_format",
"@com_google_sentencepiece//src:sentencepiece_cc_proto",
"@com_google_sentencepiece//src:sentencepiece_processor",
"@com_google_sentencepiece//:sentencepiece_cc_proto",
"@com_google_sentencepiece//:sentencepiece_processor",
"@org_tensorflow//tensorflow/core:lib",
],
)
2 changes: 1 addition & 1 deletion mediapipe/tasks/cc/text/text_classifier/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ cc_test(
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:cord",
"@com_google_sentencepiece//src:sentencepiece_processor", # fixdeps: keep
"@com_google_sentencepiece//:sentencepiece_processor", # fixdeps: keep
"@org_tensorflow//tensorflow/lite:test_util",
],
)
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/tasks/cc/text/text_embedder/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ cc_test(
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_sentencepiece//src:sentencepiece_processor",
"@com_google_sentencepiece//:sentencepiece_processor",
"@org_tensorflow//tensorflow/lite:test_util",
],
)
6 changes: 3 additions & 3 deletions mediapipe/tasks/cc/text/tokenizers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ cc_library(
"//mediapipe/framework/port:logging",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/strings",
"@com_google_sentencepiece//src:sentencepiece_processor",
"@com_google_sentencepiece//:sentencepiece_processor",
],
)

Expand All @@ -88,7 +88,7 @@ cc_test(
"//mediapipe/framework/port:gtest_main",
"//mediapipe/tasks/cc/core:utils",
"@com_google_absl//absl/log:absl_check",
"@com_google_sentencepiece//src:sentencepiece_processor",
"@com_google_sentencepiece//:sentencepiece_processor",
],
)

Expand Down Expand Up @@ -140,7 +140,7 @@ cc_test(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:cord",
"@com_google_sentencepiece//src:sentencepiece_processor",
"@com_google_sentencepiece//:sentencepiece_processor",
],
)

Expand Down
Loading

0 comments on commit a97eaad

Please sign in to comment.