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

Expose execute api for MLClient #1540

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

jackiehanyang
Copy link
Collaborator

@jackiehanyang jackiehanyang commented Oct 23, 2023

Description

Expose execute api for MLClient

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed 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.

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
@jackiehanyang jackiehanyang temporarily deployed to ml-commons-cicd-env October 23, 2023 21:46 — with GitHub Actions Inactive
@jackiehanyang jackiehanyang temporarily deployed to ml-commons-cicd-env October 23, 2023 21:46 — with GitHub Actions Inactive
@jackiehanyang jackiehanyang temporarily deployed to ml-commons-cicd-env October 23, 2023 21:46 — with GitHub Actions Inactive

verify(client).execute(eq(MLExecuteTaskAction.INSTANCE), isA(MLExecuteTaskRequest.class), any());
verify(executeTaskResponseActionListener).onResponse(argumentCaptor.capture());
assertEquals(FunctionName.METRICS_CORRELATION, argumentCaptor.getValue().getFunctionName());
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we assert the output too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added this additional assert cause you can never have too many tests but test coverage of this file is already at 100% methods and 100% lines:)

Asserting anything specific related to metrics correlation algorithm should be covered when testing the algorithm unit itself, like in this file - https://github.com/opensearch-project/ml-commons/blob/main/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelationTest.java

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #1540 (707d4eb) into main (e9e3834) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 707d4eb differs from pull request most recent head 9fd00ad. Consider uploading reports for the commit 9fd00ad to get more accurate results

@@             Coverage Diff              @@
##               main    #1540      +/-   ##
============================================
+ Coverage     78.40%   78.41%   +0.01%     
- Complexity     2378     2380       +2     
============================================
  Files           195      195              
  Lines          9588     9594       +6     
  Branches        964      964              
============================================
+ Hits           7517     7523       +6     
  Misses         1633     1633              
  Partials        438      438              
Flag Coverage Δ
ml-commons 78.41% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...rg/opensearch/ml/client/MachineLearningClient.java 100.00% <100.00%> (ø)
...pensearch/ml/client/MachineLearningNodeClient.java 98.14% <100.00%> (+0.05%) ⬆️

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
@jackiehanyang jackiehanyang temporarily deployed to ml-commons-cicd-env October 23, 2023 22:26 — with GitHub Actions Inactive
@jackiehanyang jackiehanyang temporarily deployed to ml-commons-cicd-env October 23, 2023 22:26 — with GitHub Actions Inactive
@jackiehanyang jackiehanyang merged commit 5d9324c into opensearch-project:main Oct 23, 2023
5 of 9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 23, 2023
* Expose execute api for MLClient

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* unit test change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
(cherry picked from commit 5d9324c)
dhrubo-os pushed a commit that referenced this pull request Oct 24, 2023
* Expose execute api for MLClient

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* unit test change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
(cherry picked from commit 5d9324c)

Co-authored-by: Jackie Han <jkhanjob@gmail.com>
TrungBui59 pushed a commit to TrungBui59/ml-commons that referenced this pull request Nov 6, 2023
* Expose execute api for MLClient

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* unit test change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: TrungBui59 <bui23@purdue.edu>
TrungBui59 pushed a commit to TrungBui59/ml-commons that referenced this pull request Nov 6, 2023
* Expose execute api for MLClient

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* unit test change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: TrungBui59 <bui23@purdue.edu>
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Feb 29, 2024
* Expose execute api for MLClient

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* unit test change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
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.

3 participants