Skip to content

Commit

Permalink
Add metadata to optimized model (#2618)
Browse files Browse the repository at this point in the history
* bug fix for legacy openvino models

* Add metadata to optimized model

* Revert formatting changes

---------

Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com>
  • Loading branch information
ashwinvaidya17 and Ashwin Vaidya authored Nov 9, 2023
1 parent 0d9dff8 commit 68e42d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/otx/algorithms/anomaly/tasks/openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ def optimize(
output_model.optimization_type = ModelOptimizationType.POT
output_model.optimization_methods = [OptimizationMethod.QUANTIZATION]
output_model.precision = [ModelPrecision.INT8]
metadata = self.get_metadata()
output_model.set_data("metadata", json.dumps(metadata).encode())

self.task_environment.model = output_model
self.inference_model = self.get_openvino_model()
Expand Down

0 comments on commit 68e42d0

Please sign in to comment.