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

[Draft PR] proposed implementation for supporting inference call skip in text embedding processor #1155

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

will-hwang
Copy link
Contributor

This is a Draft PR to help facilitate low level design/implementation discussions for #1138

Will revise PR after LLD discussions

Description

[Describe what this change achieves]

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 18.54839% with 101 lines in your changes missing coverage. Please review.

Project coverage is 79.69%. Comparing base (558da1f) to head (3d2a393).

Files with missing lines Patch % Lines
...rch/neuralsearch/processor/InferenceProcessor.java 16.36% 44 Missing and 2 partials ⚠️
...ch/neuralsearch/processor/util/ProcessorUtils.java 13.33% 37 Missing and 2 partials ⚠️
...neuralsearch/processor/TextEmbeddingProcessor.java 15.78% 15 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1155      +/-   ##
============================================
- Coverage     81.58%   79.69%   -1.89%     
+ Complexity     1246     1244       -2     
============================================
  Files            93       93              
  Lines          4213     4320     +107     
  Branches        714      737      +23     
============================================
+ Hits           3437     3443       +6     
- Misses          507      602      +95     
- Partials        269      275       +6     

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

* @return filtered ProcessMap with only entries that require model inferencing
*/

protected Map<String, Object> filterProcessMap(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Defining a shared method in the parent class may not be ideal for simplifying unit testing. A better approach would be to create a separate class and inject it into the processor. This allows the injected instance to be easily mocked during unit testing, making the process of writing unit tests much more straightforward.

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.

2 participants