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

Fixed openvino_inferencer in gradio_inference #972

Merged
merged 4 commits into from
Apr 3, 2023

Conversation

blaz-r
Copy link
Contributor

@blaz-r blaz-r commented Mar 19, 2023

Description

Fixed OpenVINOInferencer instantiation in gradio_inference. OpenVINOInferencer now no longer takes config parameter. This was previously fixed in openvino_inference, but not in gradio_inference, so I fixed it here as well.

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).

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 for addressing this

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (83a1b99) 81.35% compared to head (a5cdcc4) 81.35%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #972   +/-   ##
=======================================
  Coverage   81.35%   81.35%           
=======================================
  Files         176      176           
  Lines        6802     6802           
=======================================
  Hits         5534     5534           
  Misses       1268     1268           

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.

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.

I just realized that config should be made optional then as it is not needed for openvino models. We can check against the extension type and assert if config is not empty. Similarly, we should check whether the metadata is provided for the openvino inferencer.

@ashwinvaidya17 ashwinvaidya17 self-requested a review March 21, 2023 14:02
@blaz-r
Copy link
Contributor Author

blaz-r commented Mar 21, 2023

I just realized that config should be made optional then as it is not needed for openvino models. We can check against the extension type and assert if config is not empty. Similarly, we should check whether the metadata is provided for the openvino inferencer.

This is a good idea yes. It should probably be implemented in a separate PR, or do you think it can be done in this one?

@ashwinvaidya17
Copy link
Collaborator

I just realized that config should be made optional then as it is not needed for openvino models. We can check against the extension type and assert if config is not empty. Similarly, we should check whether the metadata is provided for the openvino inferencer.

This is a good idea yes. It should probably be implemented in a separate PR, or do you think it can be done in this one?

Let's do this in this one just to make it complete. We need to add just two assert statements and remove the required=True condition.

@blaz-r
Copy link
Contributor Author

blaz-r commented Mar 22, 2023

Good, I'll implement that and report back.

@blaz-r
Copy link
Contributor Author

blaz-r commented Mar 28, 2023

@ashwinvaidya17 I implemented the changes required. Made config not required and added two checks.

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 again

@samet-akcay samet-akcay merged commit 0f60f9c into openvinotoolkit:main Apr 3, 2023
@blaz-r blaz-r deleted the gradio-fix branch June 30, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: gradio_inference OpenVINOInferencer error
3 participants