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

Handle dict objects in TorchInferencer #1354

Merged

Conversation

samet-akcay
Copy link
Contributor

Description

TorchInferencer currently does not handle model outputs that return a dict object. This PR ensures that dictionaries are also handled properly.

NOTE This is a temporary PR. We should ideally wrap all of this post-processing within the torch model itself.

  • Fixes # 1142

Changes

Describe the changes you made
  • 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)
  • Documentation update

Checklist

Ensure that you followed the following
  • I have added a summary of my changes to the CHANGELOG (not for minor changes, docs and tests).
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas (If applicable)
  • I have made corresponding changes to the documentation (If applicable)
  • I have added tests that prove my fix is effective or that my feature works (If applicable)

@samet-akcay samet-akcay mentioned this pull request Sep 22, 2023
13 tasks
@samet-akcay
Copy link
Contributor Author

Thanks @blaz-r! I've addressed your comments

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 the fix

@samet-akcay samet-akcay merged commit 1952c1b into openvinotoolkit:main Sep 27, 2023
4 of 6 checks passed
@samet-akcay samet-akcay deleted the fix/torch-inference-handle-dict branch September 27, 2023 12:28
@blaz-r
Copy link
Contributor

blaz-r commented Sep 27, 2023

Nice. Thanks for this 😃

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.

None yet

3 participants