Skip to content

Commit

Permalink
🔨 Check for successful openvino conversion (#571)
Browse files Browse the repository at this point in the history
Check for successful openvino conversion
  • Loading branch information
ashwinvaidya17 committed Sep 23, 2022
1 parent 5b3fc2b commit de1bea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anomalib/deploy/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def export_convert(
if export_mode == "openvino":
export_path = os.path.join(str(export_path), "openvino")
optimize_command = "mo --input_model " + str(onnx_path) + " --output_dir " + str(export_path)
os.system(optimize_command)
assert os.system(optimize_command) == 0, "OpenVINO conversion failed"
with open(Path(export_path) / "meta_data.json", "w", encoding="utf-8") as metadata_file:
meta_data = get_model_metadata(model)
# Convert metadata from torch
Expand Down

0 comments on commit de1bea2

Please sign in to comment.