Skip to content

Commit

Permalink
Temp WA for issues with logging
Browse files Browse the repository at this point in the history
external/ovms/src/rerank/rerank_calculator.cc:373:29: error:
'rerank_calculator_logger' was not declared in this scope
Even tough ovms is build with no mp no py option

* Disable nonbuildable protos from setup.py
* Patch for incompatible opencv with ovms
external/ovms/src/tensor_conversion.cpp:55:16: error: 'CV_16F' was not
declared in this scope; did you mean 'CV_16S'?
  • Loading branch information
atobiszei committed Dec 20, 2024
1 parent c16fa30 commit 57035eb
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.openvino
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ RUN bash build_desktop_examples.sh -b
RUN curl https://storage.googleapis.com/mediapipe-assets/ssdlite_object_detection_labelmap.txt -o mediapipe/models/ssdlite_object_detection_labelmap.txt

# BUILD python framework
#RUN python setup.py install
RUN python setup.py install
## End of build image ################################################################
######################################################################################
## Start of demos image - minimal size ###############################################
Expand Down
11 changes: 10 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,10 @@ git_repository(
#commit = "027f6d05ba865d1a6913837f2f7ccf80d9d84042" # part 1
#commit = "06cff7d195b249a710597050328663877f94c835" # part 1 working before rebase
#commit = "ecab246276042725f52b8da4cb76a9677632f6a7" # part 1 OVMS works, but MP examples do not build due to GENAI inclusion in non-python build
commit = "0bb2763d556577e943b3602f91b16e99513280f5" # part 1
commit = "2ef6df50b45fd95424d488f1ea8d3d588912e22e", # part 1
patches = ["@//third_party:ovms_no_rerank_embed.patch", # TODO investigate why in MP repository bazel builds rerank/embed calcs with no mp option
"@//third_party:ovms_opencv_incompt.patch"], # TODO @atobisze this should be probably fixable with opencv version matching
patch_args = ["-p1"],
)

### OpenVINO GenAI
Expand Down Expand Up @@ -1002,4 +1005,10 @@ git_repository(
remote = "https://github.com/nlohmann/json/",
tag = "v3.11.3",
)
new_local_repository(
name = "mediapipe_calculators",
build_file = "@ovms//third_party/mediapipe_calculators:BUILD",
#path = "/ovms/third_party/mediapipe_calculators",
path = "/mediapipe", # this is temporary hack - this is not actually used to build
)
# OVMS end
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ def run(self):
# Ignore testdata dir.
if 'testdata' in proto_file:
continue
if 'genai' in proto_file:
continue
if 'detection_postprocessing_graph_options' in proto_file:
continue
self._add_empty_init_file(
os.path.abspath(
os.path.join(MP_ROOT_PATH, self.build_lib,
Expand Down
16 changes: 16 additions & 0 deletions third_party/ovms_no_rerank_embed.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/BUILD b/src/BUILD
index 5fe77a7d3..42217ad25 100644
--- a/src/BUILD
+++ b/src/BUILD
@@ -458,8 +458,9 @@ cc_library(
}) + select({
"//conditions:default": [],
"//:not_disable_mediapipe" : [
- "//src/embeddings:embeddingscalculator",
- "//src/rerank:rerankcalculator",],
+ #"//src/embeddings:embeddingscalculator",
+ #"//src/rerank:rerankcalculator",],
+ ],
}) + select({
"//:enable_drogon": ["libdrogon_http_server"],
"//conditions:default" : ["libnet_http_server"],
16 changes: 16 additions & 0 deletions third_party/ovms_opencv_incompt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/tensor_conversion.cpp b/src/tensor_conversion.cpp
index 9aae67caf..20f82162e 100644
--- a/src/tensor_conversion.cpp
+++ b/src/tensor_conversion.cpp
@@ -51,8 +51,10 @@ static int getMatTypeFromTensorPrecision(ovms::Precision tensorPrecision) {
return CV_32F;
case ovms::Precision::FP64:
return CV_64F;
+// TODO @atobisze - deosn't work on MP external/ovms/src/tensor_conversion.cpp:55:16: error: 'CV_16F' was not declared in this scope; did you mean 'CV_16S'?
case ovms::Precision::FP16:
- return CV_16F;
+ // return CV_16F;
+ return -1;
case ovms::Precision::I16:
return CV_16S;
case ovms::Precision::U8:

0 comments on commit 57035eb

Please sign in to comment.