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

enhance parsing model response function for more edge cases #2122

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

ylwu-amzn
Copy link
Collaborator

Description

Enhance parsing model response function for more edge cases

  1. Model output is invalid json
  2. Model output has no valid field.

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.

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (3b162db) 81.86% compared to head (cf94a99) 81.86%.
Report is 2 commits behind head on main.

Files Patch % Lines
...nsearch/ml/engine/algorithms/agent/AgentUtils.java 90.09% 3 Missing and 7 partials ⚠️
.../ml/engine/algorithms/agent/MLChatAgentRunner.java 92.30% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2122      +/-   ##
============================================
- Coverage     81.86%   81.86%   -0.01%     
- Complexity     5644     5657      +13     
============================================
  Files           543      543              
  Lines         22790    22843      +53     
  Branches       2333     2347      +14     
============================================
+ Hits          18658    18701      +43     
- Misses         3195     3203       +8     
- Partials        937      939       +2     
Flag Coverage Δ
ml-commons 81.86% <90.69%> (-0.01%) ⬇️

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

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

@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 11:57 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 11:57 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 11:57 — with GitHub Actions Inactive
Signed-off-by: Yaliang Wu <[email protected]>
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 16:41 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 16:41 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 16:41 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 16:41 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 17:08 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 16, 2024 17:08 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 17, 2024 17:59 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 17, 2024 17:59 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 17, 2024 17:59 — with GitHub Actions Inactive
dhrubo-os
dhrubo-os previously approved these changes Feb 17, 2024
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 17, 2024 18:26 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 17, 2024 18:26 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn temporarily deployed to ml-commons-cicd-env February 17, 2024 18:26 — with GitHub Actions Inactive
Signed-off-by: Yaliang Wu <[email protected]>
@dhrubo-os dhrubo-os merged commit 311b971 into opensearch-project:main Feb 19, 2024
10 of 14 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 19, 2024
* enhance parsing model response function for more edge cases

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

* add more unit test

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

* fine tune code; fix some bug

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

* add more unit test

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

* fix tool name bug

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

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit 311b971)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 19, 2024
* enhance parsing model response function for more edge cases

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

* add more unit test

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

* fine tune code; fix some bug

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

* add more unit test

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

* fix tool name bug

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

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit 311b971)
ylwu-amzn added a commit that referenced this pull request Feb 19, 2024
…2129)

* enhance parsing model response function for more edge cases

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

* add more unit test

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

* fine tune code; fix some bug

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

* add more unit test

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

* fix tool name bug

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

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit 311b971)

Co-authored-by: Yaliang Wu <[email protected]>
ylwu-amzn added a commit that referenced this pull request Feb 19, 2024
…2128)

* enhance parsing model response function for more edge cases

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

* add more unit test

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

* fine tune code; fix some bug

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

* add more unit test

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

* fix tool name bug

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

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit 311b971)

Co-authored-by: Yaliang Wu <[email protected]>
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Mar 19, 2024
…ch-project#2122)

* enhance parsing model response function for more edge cases

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

* add more unit test

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

* fine tune code; fix some bug

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

* add more unit test

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

* fix tool name bug

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

---------

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants