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

#351 - Add support for ML-Common's stats API #354

Closed
wants to merge 15 commits into from

Conversation

rawwar
Copy link
Contributor

@rawwar rawwar commented Dec 12, 2023

Description

Adds support for Stats API

Issues Resolved

closes #351

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: kalyanr <kalyan.ben10@live.com>
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: Patch coverage is 18.18182% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 90.12%. Comparing base (529ee34) to head (0f2c58b).
Report is 1 commits behind head on main.

❗ Current head 0f2c58b differs from pull request most recent head 085c008. Consider uploading reports for the commit 085c008 to get more accurate results

Files Patch % Lines
opensearch_py_ml/ml_commons/ml_commons_client.py 18.18% 9 Missing ⚠️
opensearch_py_ml/ml_commons/validators/stats.py 18.18% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #354      +/-   ##
==========================================
- Coverage   91.53%   90.12%   -1.41%     
==========================================
  Files          42       43       +1     
  Lines        4395     4417      +22     
==========================================
- Hits         4023     3981      -42     
- Misses        372      436      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
@rawwar
Copy link
Contributor Author

rawwar commented Dec 12, 2023

@dhrubo-os , it seems like Stats API doesn't work for 2.7.0 . Its been failing with the following error message

`raw_data = '{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Wrong ML cluster level stat"}],"type":"illegal_argument_exception","reason":"Wrong ML cluster level stat"},"status":400}

`

But, its working fine for 2.11.0. Hence, I skipped the stats test for 2.7.0. Is this ok?

@rawwar rawwar marked this pull request as ready for review December 14, 2023 03:47
@rawwar
Copy link
Contributor Author

rawwar commented Dec 19, 2023

@dhrubo-os , were you able to find examples for the request body that can be sent to stats api?

…/ml-commons-stats

Signed-off-by: kalyanr <kalyan.ben10@live.com>
…ch-py-ml into kalyan/ml-commons-stats

Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
@dhrubo-os
Copy link
Collaborator

Add test?

Integration test failing.

Signed-off-by: kalyanr <kalyan.ben10@live.com>
@rawwar
Copy link
Contributor Author

rawwar commented Mar 7, 2024

Add test?

Integration test failing.

updated it

@dhrubo-os
Copy link
Collaborator

Can you also please update the issue description with more details like which examples your tried so far to do the functional test?

Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
@dhrubo-os
Copy link
Collaborator

Could you please resolve the conflict?

…ch-py-ml into kalyan/ml-commons-stats

Signed-off-by: kalyanr <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
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.

[FEATURE] Add support for Model Stats
2 participants