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

Remove config dependency from OpenVINOInferencer #939

Conversation

samet-akcay
Copy link
Contributor

Description

  • OpenVINO Inferencer currently expects config argument. Ideally, the parameters within config should be in metadata. This PR addresses this problem.

Changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which refactors the code base)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the pre-commit style and check guidelines of this project.
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • I have added a summary of my changes to the CHANGELOG (not for minor changes, docs and tests).

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Patch coverage: 86.36% and no project coverage change.

Comparison is base (522858f) 81.34% compared to head (e12342a) 81.34%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #939   +/-   ##
=======================================
  Coverage   81.34%   81.34%           
=======================================
  Files         176      176           
  Lines        6812     6808    -4     
=======================================
- Hits         5541     5538    -3     
+ Misses       1271     1270    -1     
Impacted Files Coverage Δ
src/anomalib/deploy/inferencers/base_inferencer.py 72.60% <70.00%> (ø)
src/anomalib/utils/sweep/helpers/inference.py 33.33% <75.00%> (ø)
...anomalib/deploy/inferencers/openvino_inferencer.py 87.64% <82.35%> (-0.24%) ⬇️
...rc/anomalib/deploy/inferencers/torch_inferencer.py 87.23% <87.50%> (ø)
src/anomalib/deploy/__init__.py 100.00% <100.00%> (ø)
src/anomalib/deploy/export.py 100.00% <100.00%> (ø)
src/anomalib/models/cfa/torch_model.py 92.75% <100.00%> (ø)
src/anomalib/utils/callbacks/export.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -37,7 +37,7 @@
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Paula had asked to keep this image. So it would be nice if we keep it.


Reply via ReviewNB

@@ -37,7 +37,7 @@
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

This image as well


Reply via ReviewNB

Copy link
Contributor

@djdameln djdameln left a comment

Choose a reason for hiding this comment

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

Thanks. Only a single minor comment

@@ -63,7 +63,7 @@ logging:
log_graph: false # Logs the model graph to respective logger.

optimization:
export_mode: null #options: onnx, openvino
export_mode: openvino #options: onnx, openvino
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this was committed by mistake?

Copy link
Collaborator

@ashwinvaidya17 ashwinvaidya17 left a comment

Choose a reason for hiding this comment

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

Thanks. I have some general comments.

While the cube_config is not used anywhere we might have to keep it because the blog post might reference it. When Paula was checking the differences in the outputs by API and CLI she tried running the CLI as well. We had fixed one issue related to normalization in the config even after the API in the notebooks was giving correct result. Maybe we can run it by her.

anomalib/models/padim/config.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ashwinvaidya17 ashwinvaidya17 left a comment

Choose a reason for hiding this comment

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

Thanks

@samet-akcay samet-akcay merged commit f023a83 into openvinotoolkit:main Mar 10, 2023
@samet-akcay samet-akcay deleted the refactor/sa/remove-config-dependency-from-openvino-inferencer branch March 10, 2023 22:49
@paularamo
Copy link

paularamo commented May 9, 2023

@samet-akcay Could we reopen this PR? I see some errors in the 501 notebooks. OpenVINO model is not saved properly in the expected path and also the config file is referenced in the blog, and the link is broken. I will paste here the error I had so far:

image
image

In the folder the IR model is not in the expected place:
image
image

Appreciate your help on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants