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

support dispatching execute task; don't dispatch ML task again #279

Merged
merged 2 commits into from
Apr 15, 2022

Conversation

ylwu-amzn
Copy link
Collaborator

Signed-off-by: Yaliang Wu [email protected]

Description

  1. support dispatching execute task;
  2. don't dispatch ML task again
  3. add request id to track the request easily

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.

@ylwu-amzn ylwu-amzn requested a review from a team April 13, 2022 19:08
@@ -207,7 +207,8 @@ jacocoTestReport {
List<String> jacocoExclusions = [
// TODO: add more unit test to meet the minimal test coverage.
'org.opensearch.ml.constant.CommonValue',
'org.opensearch.ml.plugin.MachineLearningPlugin*'
'org.opensearch.ml.plugin.MachineLearningPlugin*',
'org.opensearch.ml.task.MLPredictTaskRunner'
Copy link
Collaborator

@Zhangxunmt Zhangxunmt Apr 14, 2022

Choose a reason for hiding this comment

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

We might want to refactor this PredictTaskRunner later. It has a big body in predict() method which is not test friendly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, good point, we can refactor later

Zhangxunmt
Zhangxunmt previously approved these changes Apr 14, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@5eb38f7). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #279   +/-   ##
=======================================
  Coverage        ?   92.16%           
  Complexity      ?      360           
=======================================
  Files           ?       51           
  Lines           ?     1111           
  Branches        ?       51           
=======================================
  Hits            ?     1024           
  Misses          ?       69           
  Partials        ?       18           
Flag Coverage Δ
ml-commons 92.16% <0.00%> (?)

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5eb38f7...00eb304. Read the comment docs.

@@ -46,6 +49,8 @@ public class TaskRunnerTests extends OpenSearchTestCase {
MLTaskDispatcher mlTaskDispatcher;
@Mock
MLCircuitBreakerService mlCircuitBreakerService;
@Mock
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curiosity question: this CuslterService mock has to be used together with extending OpenSearchTestCase` right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Answering my own question here: no it doesn't have to

@ylwu-amzn ylwu-amzn merged commit 1e15c88 into opensearch-project:main Apr 15, 2022
@Zhangxunmt Zhangxunmt added bug Something isn't working backport 2.x backport 2.0 labels Apr 20, 2022
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-279-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1e15c8804e0734015c3494a2f0bc070d59634df9
# Push it to GitHub
git push --set-upstream origin backport/backport-279-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-279-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.0 2.0
# Navigate to the new working tree
cd .worktrees/backport-2.0
# Create a new branch
git switch --create backport/backport-279-to-2.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1e15c8804e0734015c3494a2f0bc070d59634df9
# Push it to GitHub
git push --set-upstream origin backport/backport-279-to-2.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.0

Then, create a pull request where the base branch is 2.0 and the compare/head branch is backport/backport-279-to-2.0.

ylwu-amzn added a commit to ylwu-amzn/ml-commons that referenced this pull request Apr 22, 2022
…earch-project#279)

* support dispatching execute task; don't dispatch ML task again

Signed-off-by: Yaliang Wu <[email protected]>

* remove MLPredictTaskRunner from jacoco exclusion list

Signed-off-by: Yaliang Wu <[email protected]>
ylwu-amzn added a commit that referenced this pull request Apr 25, 2022
… task again (#298)

* support dispatching execute task; don't dispatch ML task again (#279)

* support dispatching execute task; don't dispatch ML task again

Signed-off-by: Yaliang Wu <[email protected]>

* remove MLPredictTaskRunner from jacoco exclusion list

Signed-off-by: Yaliang Wu <[email protected]>

* fix compiling error

Signed-off-by: Yaliang Wu <[email protected]>
ylwu-amzn added a commit to ylwu-amzn/ml-commons that referenced this pull request Apr 25, 2022
…earch-project#279)

* support dispatching execute task; don't dispatch ML task again

Signed-off-by: Yaliang Wu <[email protected]>

* remove MLPredictTaskRunner from jacoco exclusion list

Signed-off-by: Yaliang Wu <[email protected]>
jackiehanyang pushed a commit that referenced this pull request Apr 26, 2022
… task again (#279) (#301)

* support dispatching execute task; don't dispatch ML task again (#279)

* support dispatching execute task; don't dispatch ML task again

Signed-off-by: Yaliang Wu <[email protected]>

* remove MLPredictTaskRunner from jacoco exclusion list

Signed-off-by: Yaliang Wu <[email protected]>

* fix checkstyle error

Signed-off-by: Yaliang Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants