Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Pytorch models for insert_xai API #61

Merged

Conversation

goodsong81
Copy link
Contributor

@goodsong81 goodsong81 commented Sep 2, 2024

image
[Changes]

  • Support torch.nn.Module in addition to openvino.Model for insert_xai() API
    • ActivationMap / ReciproCAM / ViTReciproCAM methods
  • Update dependencies / merge dev & val tox envs -> dev
  • Rename test directories
  • Unit tests
  • Integration tests

[Future works]

  • Feature layer auto detection
  • Functional tests
  • Refactoring
  • Documentation + example

@goodsong81 goodsong81 force-pushed the feat/torch-insert-xai-name branch from 121458a to fadee6e Compare September 2, 2024 07:39
@goodsong81 goodsong81 added this to the 1.1.0 milestone Sep 2, 2024
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

Attention: Patch coverage is 97.05882% with 6 lines in your changes missing coverage. Please review.

Project coverage is 94.22%. Comparing base (f637a5f) to head (40d79fa).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
openvino_xai/methods/white_box/torch.py 96.64% 5 Missing ⚠️
openvino_xai/methods/factory.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #61      +/-   ##
===========================================
+ Coverage    93.65%   94.22%   +0.57%     
===========================================
  Files           26       27       +1     
  Lines         1638     1817     +179     
===========================================
+ Hits          1534     1712     +178     
- Misses         104      105       +1     
Flag Coverage Δ
dev-py310 94.22% <97.05%> (+0.57%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@goodsong81 goodsong81 force-pushed the feat/torch-insert-xai-name branch 2 times, most recently from cc5e9e0 to ca935f6 Compare September 3, 2024 09:14
@goodsong81 goodsong81 force-pushed the feat/torch-insert-xai-name branch from ca935f6 to 8a8eb75 Compare September 4, 2024 05:24
@goodsong81 goodsong81 force-pushed the feat/torch-insert-xai-name branch from 8a8eb75 to 36369ad Compare September 4, 2024 05:25
@goodsong81 goodsong81 marked this pull request as ready for review September 4, 2024 05:39
Copy link
Collaborator

@negvet negvet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cool upgrade, please see some questions below

openvino_xai/methods/black_box/base.py Outdated Show resolved Hide resolved
openvino_xai/methods/white_box/torch.py Show resolved Hide resolved
openvino_xai/methods/white_box/torch.py Show resolved Hide resolved
openvino_xai/methods/white_box/torch.py Show resolved Hide resolved
openvino_xai/methods/white_box/torch.py Outdated Show resolved Hide resolved
@negvet
Copy link
Collaborator

negvet commented Sep 4, 2024

What about a dedicated examples/torch/classification.py?

Copy link
Contributor

@GalyaZalesskaya GalyaZalesskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the great update. Left a few questions

openvino_xai/methods/white_box/torch.py Show resolved Hide resolved
openvino_xai/methods/white_box/torch.py Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@goodsong81
Copy link
Contributor Author

What about a dedicated examples/torch/classification.py?

Sure, I also thought it would be good to have. I'll add one in the upcoming PR along with doc update.

@goodsong81 goodsong81 force-pushed the feat/torch-insert-xai-name branch from ce43d6b to 3fa9b04 Compare September 5, 2024 04:37
@goodsong81 goodsong81 merged commit 8b0ddf9 into openvinotoolkit:develop Sep 5, 2024
6 checks passed
@goodsong81 goodsong81 deleted the feat/torch-insert-xai-name branch September 5, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants