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

add more stats: connector count, connector/config index status; fix model count bug #1180

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

ylwu-amzn
Copy link
Collaborator

@ylwu-amzn ylwu-amzn commented Aug 2, 2023

Description

Add more stats:

  • connector count
  • connector index status
  • config index status

Fix model count bug: local model may have multiple chunks, the model count number should not include model chunk.

Also fine tune some error message

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.

@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 22:59 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 22:59 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 22:59 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 22:59 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #1180 (91eeae3) into 2.9 (82bddb1) will decrease coverage by 0.18%.
Report is 1 commits behind head on 2.9.
The diff coverage is 57.89%.

@@             Coverage Diff              @@
##                2.9    #1180      +/-   ##
============================================
- Coverage     78.92%   78.75%   -0.18%     
- Complexity     2119     2121       +2     
============================================
  Files           167      167              
  Lines          8633     8676      +43     
  Branches        869      870       +1     
============================================
+ Hits           6814     6833      +19     
- Misses         1423     1448      +25     
+ Partials        396      395       -1     
Flag Coverage Δ
ml-commons 78.75% <57.89%> (-0.18%) ⬇️

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

Files Changed Coverage Δ
...va/org/opensearch/ml/engine/utils/ScriptUtils.java 76.47% <ø> (ø)
...a/org/opensearch/ml/model/MLModelGroupManager.java 84.48% <ø> (ø)
.../main/java/org/opensearch/ml/utils/IndexUtils.java 41.17% <0.00%> (-22.46%) ⬇️
.../opensearch/ml/engine/encryptor/EncryptorImpl.java 91.04% <66.66%> (ø)
...java/org/opensearch/ml/rest/RestMLStatsAction.java 91.66% <78.94%> (-3.24%) ⬇️
...ch/ml/engine/algorithms/remote/ConnectorUtils.java 70.83% <87.50%> (+2.08%) ⬆️
...rg/opensearch/ml/plugin/MachineLearningPlugin.java 99.04% <100.00%> (+0.03%) ⬆️
...va/org/opensearch/ml/stats/MLClusterLevelStat.java 80.00% <100.00%> (+8.57%) ⬆️

... and 3 files with indirect coverage changes

@@ -77,7 +77,7 @@ public void createModelGroup(MLRegisterModelGroupInput input, ActionListener<Str
new IllegalArgumentException(
"The name you provided is already being used by another model with ID: "
+ id
+ ". Please provide a different name"
+ ". Please provide a different name or add \"model_group_id\": \"lMPmr4kB4eSCtCCDmCDm\" to request body"
Copy link
Collaborator

@dhrubo-os dhrubo-os Aug 2, 2023

Choose a reason for hiding this comment

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

Should we update to Please provide a different model group name. We can see people started having confusion: #1179

about: \"model_group_id\": \"lMPmr4kB4eSCtCCDmCDm\" : Is this any static group id we are adding?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed hard coded model id .
For Please provide a different model group name , that looks also confusing as user just provide model name in the request body, not model group name,

POST _plugins/_ml/models/_upload
{
  "name": "huggingface/sentence-transformers/all-MiniLM-L12-v2",
  "version": "1.0.1",
  "model_format": "TORCH_SCRIPT"
}

Signed-off-by: Yaliang Wu <[email protected]>
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 23:57 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 23:57 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 23:57 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env August 2, 2023 23:57 — with GitHub Actions Inactive
Copy link
Collaborator

@Zhangxunmt Zhangxunmt left a comment

Choose a reason for hiding this comment

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

We may add more granularity stats like connector/model count for sageMaker, etc, if necessary in the future.

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.

4 participants