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 error for case when mltensor has data as null #404

Merged

Conversation

martin-gaievski
Copy link
Member

Description

Found that we're not handling properly case when MLTensor has data == null from model/connector on predict call. Need to throw proper exception in that case

Check List

  • All tests pass
  • Commits are signed as per the DCO using --signoff

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.

@martin-gaievski martin-gaievski added skip-changelog backport 2.11 v2.11.0 Issues targeting release v2.11.0 labels Oct 6, 2023
@martin-gaievski martin-gaievski force-pushed the fix_empty_data_in_mltensor branch from 18b95ed to e592ad7 Compare October 6, 2023 20:00
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #404 (e592ad7) into 2.x (841f280) will decrease coverage by 0.03%.
Report is 1 commits behind head on 2.x.
The diff coverage is 80.00%.

❗ Current head e592ad7 differs from pull request most recent head 5f47156. Consider uploading reports for the commit 5f47156 to get more accurate results

@@             Coverage Diff              @@
##                2.x     #404      +/-   ##
============================================
- Coverage     80.69%   80.67%   -0.03%     
- Complexity      496      501       +5     
============================================
  Files            41       41              
  Lines          1554     1573      +19     
  Branches        237      241       +4     
============================================
+ Hits           1254     1269      +15     
- Misses          200      201       +1     
- Partials        100      103       +3     
Files Coverage Δ
...earch/neuralsearch/ml/MLCommonsClientAccessor.java 93.63% <80.00%> (-0.65%) ⬇️

... and 1 file with indirect coverage changes

@@ -40,6 +42,7 @@
public class MLCommonsClientAccessor {
private static final List<String> TARGET_RESPONSE_FILTERS = List.of("sentence_embedding");
private final MachineLearningNodeClient mlClient;
private static final String EXCEPTION_MESSAGE_MODEL_PROCESSING_FAILED = "the system encountered an unexpected error during processing";
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to fix this, lets make it more informative.

Signed-off-by: Martin Gaievski <[email protected]>
@martin-gaievski martin-gaievski force-pushed the fix_empty_data_in_mltensor branch from 9f46960 to 5f47156 Compare October 6, 2023 22:51
@navneet1v navneet1v merged commit 47d1aee into opensearch-project:2.x Oct 6, 2023
12 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 6, 2023
* Fixed error for case when mltensor has data as null

Signed-off-by: Martin Gaievski <[email protected]>

* Changed error message handling

Signed-off-by: Martin Gaievski <[email protected]>

---------

Signed-off-by: Martin Gaievski <[email protected]>
(cherry picked from commit 47d1aee)
navneet1v pushed a commit that referenced this pull request Oct 6, 2023
* Fixed error for case when mltensor has data as null

Signed-off-by: Martin Gaievski <[email protected]>

* Changed error message handling

Signed-off-by: Martin Gaievski <[email protected]>

---------

Signed-off-by: Martin Gaievski <[email protected]>
(cherry picked from commit 47d1aee)

Co-authored-by: Martin Gaievski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.11 skip-changelog v2.11.0 Issues targeting release v2.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants