Skip to content

Commit

Permalink
Upgrade OpenVINO to 2024.3.0 (#52)
Browse files Browse the repository at this point in the history
* Update openvino-dev==2023.3

* Update tests

* Update change log
  • Loading branch information
goodsong81 authored Aug 7, 2024
1 parent 2967389 commit 00ebd2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* Support OpenVINO IR (.xml) / ONNX (.onnx) model file for `Explainer` model
* Enable AISE: Adaptive Input Sampling for Explanation of Black-box Models.
* Upgrade OpenVINO to 2024.3.0

### What's Changed

Expand All @@ -15,6 +16,7 @@
* Support OV IR / ONNX model file for Explainer by @goodsong81 in https://github.com/openvinotoolkit/openvino_xai/pull/47
* Try CNN -> ViT assumption for IR insertion by @goodsong81 in https://github.com/openvinotoolkit/openvino_xai/pull/48
* Enable AISE: Adaptive Input Sampling for Explanation of Black-box Models by @negvet in https://github.com/openvinotoolkit/openvino_xai/pull/49
* Upgrade OpenVINO to 2024.3.0 by @goodsong81 in https://github.com/openvinotoolkit/openvino_xai/pull/52

### Known Issues

Expand Down
4 changes: 2 additions & 2 deletions openvino_xai/methods/white_box/recipro_cam.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ def _get_saliency_map(self, model_clone: ov.Model) -> ov.Node:
norm_node_ori = self._get_non_add_node_from_two_nodes(post_target_node_ori)
while norm_node_ori.get_type_name() != "Add":
if len(norm_node_ori.outputs()) > 1:
raise ValueError
raise ValueError("Number of normalization outputs > 1!")
inputs = norm_node_ori.output(0).get_target_inputs()
if len(inputs) > 1:
raise ValueError
raise ValueError("Number of normalization inputs > 1!")
norm_node_ori = next(iter(inputs)).get_node()

# Mosaic feature map after the LayerNorm
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
name = "openvino_xai"
version = "1.1.0rc0"
dependencies = [
"openvino-dev==2024.2",
"openvino-dev==2024.3",
"opencv-python",
"scipy",
"numpy==1.*",
Expand Down
24 changes: 3 additions & 21 deletions tests/func/test_classification_timm_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,19 @@
SUPPORTED_BUT_FAILED_BY_BB_MODELS = {}

NOT_SUPPORTED_BY_BB_MODELS = {
"_nfnet_": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"convit": "RuntimeError: Couldn't get TorchScript module by tracing.",
"convnext_xxlarge": "RuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library.",
"convnextv2_huge": "RuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library.",
"deit3_huge": "RuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library.",
"dm_nfnet": "openvino._pyopenvino.GeneralFailure: Check 'false' failed at src/frontends/onnx/frontend/src/frontend.cpp:144",
"eca_nfnet": "openvino._pyopenvino.GeneralFailure: Check 'false' failed at src/frontends/onnx/frontend/src/frontend.cpp:144",
"eva_giant": "RuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library.",
# "halo": "torch.onnx.errors.SymbolicValueError: Unsupported: ONNX export of operator Unfold, input size not accessible.",
"nf_regnet": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"nf_resnet": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"nfnet_l0": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"regnety_1280": "RuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library.",
"regnety_2560": "RuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library.",
"repvit": "urllib.error.HTTPError: HTTP Error 404: Not Found",
"resnetv2": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"tf_efficientnet_cc": "torch.onnx.errors.SymbolicValueError: Unsupported: ONNX export of convolution for kernel of unknown shape.",
"vit_base_r50_s16_224.orig_in21k": "RuntimeError: Error(s) in loading state_dict for VisionTransformer",
"vit_gigantic_patch16_224_ijepa.in22k": "RuntimeError: shape '[1, 13, 13, -1]' is invalid for input of size 274560",
"vit_huge_patch14_224.orig_in21k": "RuntimeError: Error(s) in loading state_dict for VisionTransformer",
"vit_large_patch32_224.orig_in21k": "RuntimeError: Error(s) in loading state_dict for VisionTransformer",
"vit_large_r50_s32": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"vit_small_r26_s32": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"vit_tiny_r_s16": "RuntimeError: Exception from src/inference/src/cpp/core.cpp:90: Training mode of BatchNormalization is not supported.",
"volo_": "torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::col2im' to ONNX opset version 14 is not supported.",
"volo_": "RuntimeError: Exception from src/core/src/dimension.cpp:227: Cannot get length of dynamic dimension",
}

SUPPORTED_BUT_FAILED_BY_WB_MODELS = {
"convformer": "Cannot find output backbone_node in auto mode, please provide target_layer.",
"swin": "Only two outputs of the between block Add node supported, but got 1. Try to use black-box.",
"vit_base_patch16_rpn_224": "Number of normalization outputs > 1",
"vit_relpos_medium_patch16_rpn_224": "ValueError in openvino_xai/methods/white_box/recipro_cam.py:215",
}

NOT_SUPPORTED_BY_WB_MODELS = {
Expand Down Expand Up @@ -103,7 +86,6 @@
"tnt_s_patch16_224": "Only two outputs of the between block Add node supported, but got 1.",
"twins": "One (and only one) of the nodes has to be Add type. But got ShapeOf and Transpose.",
# work in CNN mode -> "visformer": "Cannot find output backbone_node in auto mode, please provide target_layer",
"vit_relpos_medium_patch16_rpn_224": "ValueError in openvino_xai/methods/white_box/recipro_cam.py:215",
}


Expand Down

0 comments on commit 00ebd2e

Please sign in to comment.