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

adding model level metric in node level #1330

Merged
merged 7 commits into from
Oct 4, 2023

Conversation

dhrubo-os
Copy link
Collaborator

@dhrubo-os dhrubo-os commented Sep 12, 2023

Description

[adding model level metric in node level : https://github.com//issues/1295

With this change stat api will show metrics like:

{
    "nodes": {
        "KKGb_PrDQl2zWWIhifyFdQ": {
            "algorithms": {
                "text_embedding": {
                    "deploy": {
                        "ml_action_request_count": 1
                    },
                    "register": {
                        "ml_action_request_count": 1
                    },
                    "predict": {
                        "ml_action_request_count": 1
                    }
                }
            },
            "models": {
                "FFt4i4oBkVwzPy8kRevJ": {
                    "deploy": {
                        "ml_action_request_count": 1
                    },
                    "predict": {
                        "ml_action_request_count": 1
                    }
                }
            }
        }
    }
}

]

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
Copy link
Collaborator

CI failed

@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 00:32 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os had a problem deploying to ml-commons-cicd-env October 4, 2023 00:32 — with GitHub Actions Failure
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 00:53 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 00:53 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os had a problem deploying to ml-commons-cicd-env October 4, 2023 00:53 — with GitHub Actions Failure
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 00:53 — with GitHub Actions Inactive

@Override
public void writeTo(StreamOutput out) throws IOException {
if (modelStats != null && modelStats.size() > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missed out.writeBoolean(true)? Also fix public MLModelStats(StreamInput in) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry for the confusion. I didn't clearly understand your comment. This class is pretty much similar to this class

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 19:58 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 19:58 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os had a problem deploying to ml-commons-cicd-env October 4, 2023 19:58 — with GitHub Actions Failure
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 20:33 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 20:33 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 20:33 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 20:57 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 20:57 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 20:57 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os temporarily deployed to ml-commons-cicd-env October 4, 2023 20:57 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os merged commit bb84282 into opensearch-project:2.x Oct 4, 2023
9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 16, 2023
* adding model level metric in node level

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* spotlessApply and fixed a test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* added if clause to bypass the integration test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressed comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* add more tests

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* adding boolean check if model stats exists

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit bb84282)
ylwu-amzn pushed a commit that referenced this pull request Oct 16, 2023
* adding model level metric in node level

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* spotlessApply and fixed a test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* added if clause to bypass the integration test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressed comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* add more tests

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* adding boolean check if model stats exists

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit bb84282)

Co-authored-by: Dhrubo Saha <dhrubo@amazon.com>
TrungBui59 pushed a commit to TrungBui59/ml-commons that referenced this pull request Nov 21, 2023
…ensearch-project#1522)

* adding model level metric in node level

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* spotlessApply and fixed a test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* added if clause to bypass the integration test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressed comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* add more tests

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* adding boolean check if model stats exists

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit bb84282)

Co-authored-by: Dhrubo Saha <dhrubo@amazon.com>
Signed-off-by: TrungBui59 <bui23@purdue.edu>
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Feb 29, 2024
…ensearch-project#1522)

* adding model level metric in node level

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* spotlessApply and fixed a test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* added if clause to bypass the integration test

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressed comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* add more tests

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* adding boolean check if model stats exists

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit bb84282)

Co-authored-by: Dhrubo Saha <dhrubo@amazon.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