-
Notifications
You must be signed in to change notification settings - Fork 64
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
[Feature] Add Question Answering Model (old) #329
[Feature] Add Question Answering Model (old) #329
Conversation
Signed-off-by: VincentZhao12 <[email protected]> Co-authored-by: VincentZhao12 <[email protected]>
…arch-project#311) * update cluster settings in developer guide Signed-off-by: kalyanr <[email protected]> * updated settings Signed-off-by: kalyanr <[email protected]> * update dev guide Signed-off-by: kalyanr <[email protected]> * fix grammar Signed-off-by: kalyan <[email protected]> --------- Signed-off-by: kalyanr <[email protected]> Signed-off-by: kalyan <[email protected]>
Signed-off-by: xinyual <[email protected]>
…base-v2 (v.1.0.0)(BOTH) (opensearch-project#321) * GitHub Actions Workflow: Update Model Upload History - sentence-transformers/paraphrase-mpnet-base-v2 (v.1.0.0)(BOTH) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * GitHub Actions Workflow: Update CHANGELOG.md - sentence-transformers/paraphrase-mpnet-base-v2 (v.1.0.0)(BOTH) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dhrubo-os <[email protected]>
…ject#322) * GitHub Actions Workflow: Update Pretrained Model Listing Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * GitHub Actions Workflow: Update CHANGELOG.md - Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Dhrubo Saha <[email protected]> Co-authored-by: dhrubo-os <[email protected]> Co-authored-by: Dhrubo Saha <[email protected]>
Signed-off-by: kalyan <[email protected]>
Signed-off-by: faradawn <[email protected]>
Signed-off-by: faradawn <[email protected]>
@@ -0,0 +1,37 @@ | |||
# Save our model as pt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this file here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a file that imports question_answering_model.py
directly instead of going through the pip module. It was for testing convience for them to be in the same directory. We can remove this file!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that would be awesome. I would like you to present tomorrow about this model tracing in our office hour so that we can learn about this together.
official_answer = tokenizer.decode(predict_answer_tokens) | ||
return official_answer | ||
|
||
def test_onnx(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are we asserting in the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should assert if our answer string is equal to the official answer. I can add an assertion statement instead of printing the two outputs!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A question here. Would response be always same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think generative models have randomness. Here in the three runs and the outputs were the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they are different, then one way is to just calculate the cosine similarity between expected output and the actual output. Usually they don't differ much and it will be having high value.
Tests are failing:
|
…h-project#330) * move test-search to the end Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> --------- Signed-off-by: kalyan <[email protected]>
* add ml-commons train support Signed-off-by: kalyanr <[email protected]> * update __all__ Signed-off-by: kalyanr <[email protected]> * fix test cases Signed-off-by: kalyanr <[email protected]> * sleep after bulk insert Signed-off-by: kalyanr <[email protected]> * fix formatting Signed-off-by: kalyanr <[email protected]> * remove unused imports Signed-off-by: kalyanr <[email protected]> * remove duplicate conftest Signed-off-by: kalyan <[email protected]> * delete duplicate conftest Signed-off-by: kalyan <[email protected]> * include pytest plugins Signed-off-by: kalyan <[email protected]> * revert pandas version Signed-off-by: Kalyan <[email protected]> * include license Signed-off-by: kalyan <[email protected]> * fix formatting Signed-off-by: kalyan <[email protected]> * fix imports order Signed-off-by: kalyan <[email protected]> * fix imports order Signed-off-by: kalyan <[email protected]> * lint fix Signed-off-by: kalyan <[email protected]> * update changelog Signed-off-by: kalyan <[email protected]> * revert testcases Signed-off-by: kalyan <[email protected]> * remove fixtures Signed-off-by: kalyan <[email protected]> * updated test cases Signed-off-by: kalyan <[email protected]> * lint fixes Signed-off-by: kalyan <[email protected]> * update fixture Signed-off-by: kalyan <[email protected]> * revert Signed-off-by: kalyan <[email protected]> * include train in MLCommons class as a func Signed-off-by: kalyan <[email protected]> * remove model train Signed-off-by: kalyan <[email protected]> * fix tests Signed-off-by: kalyan <[email protected]> * revert nox Signed-off-by: kalyan <[email protected]> * add tests to model_train Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> --------- Signed-off-by: kalyanr <[email protected]> Signed-off-by: kalyan <[email protected]> Signed-off-by: Kalyan <[email protected]>
* fix Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> * update changelog Signed-off-by: kalyan <[email protected]> * update changelog Signed-off-by: kalyan <[email protected]> --------- Signed-off-by: kalyan <[email protected]>
…functionality to support Model Access Control (opensearch-project#332) * init Signed-off-by: kalyan <[email protected]> * add search, delete and update Signed-off-by: kalyan <[email protected]> * add tests for register model group Signed-off-by: kalyan <[email protected]> * update cluster to 2.11 Signed-off-by: kalyan <[email protected]> * test skipif Signed-off-by: kalyan <[email protected]> * fix Signed-off-by: kalyan <[email protected]> * add tests Signed-off-by: kalyan <[email protected]> * update matrix Signed-off-by: kalyan <[email protected]> * cancel in progress Signed-off-by: kalyan <[email protected]> * update concurrency Signed-off-by: kalyan <[email protected]> * job level concurrency Signed-off-by: kalyan <[email protected]> * fix Signed-off-by: kalyan <[email protected]> * fix Signed-off-by: kalyan <[email protected]> * fix tests Signed-off-by: kalyan <[email protected]> * tests passing Signed-off-by: kalyan <[email protected]> * isort fix Signed-off-by: kalyan <[email protected]> * fix action Signed-off-by: kalyan <[email protected]> * fix action Signed-off-by: kalyan <[email protected]> * fix action Signed-off-by: kalyan <[email protected]> * fix Signed-off-by: kalyan <[email protected]> * update changelog Signed-off-by: kalyan <[email protected]> * fix os dockerfile Signed-off-by: kalyan <[email protected]> * test Signed-off-by: kalyanr <[email protected]> * pass opensearch version Signed-off-by: kalyanr <[email protected]> * fix Signed-off-by: kalyanr <[email protected]> * fix Signed-off-by: kalyanr <[email protected]> * fix Signed-off-by: kalyan <[email protected]> * update OS dockerfile Signed-off-by: kalyan <[email protected]> * fix failing tests Signed-off-by: kalyan <[email protected]> * update dockerfile for 2.11.0 Signed-off-by: kalyan <[email protected]> * remove disable warning Signed-off-by: kalyan <[email protected]> * fix upload model Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> * include reference Signed-off-by: kalyan <[email protected]> * pr fixes Signed-off-by: kalyan <[email protected]> * lint fix Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> * fix tests Signed-off-by: kalyan <[email protected]> * skip Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> * fix lint and increase coverage Signed-off-by: kalyan <[email protected]> * fix lint Signed-off-by: kalyan <[email protected]> * fix Signed-off-by: kalyan <[email protected]> * feedback fixes Signed-off-by: kalyan <[email protected]> * fix Signed-off-by: kalyan <[email protected]> * lint fix Signed-off-by: kalyan <[email protected]> * fix test cases Signed-off-by: kalyan <[email protected]> * pr feedback fixes Signed-off-by: kalyanr <[email protected]> * revert Signed-off-by: kalyanr <[email protected]> --------- Signed-off-by: kalyan <[email protected]> Signed-off-by: kalyanr <[email protected]>
* replace is_datetime_or_timedelta_dtype Signed-off-by: kalyan <[email protected]> * fix formatting Signed-off-by: kalyan <[email protected]> * fix import order Signed-off-by: kalyan <[email protected]> * update changelog Signed-off-by: kalyan <[email protected]> --------- Signed-off-by: kalyan <[email protected]> Signed-off-by: kalyanr <[email protected]>
…ch-py-ml into feature/summarization_model_conversation
Signed-off-by: faradawn <[email protected]>
Signed-off-by: faradawn <[email protected]>
Signed-off-by: faradawn <[email protected]>
72cb969
to
e149375
Compare
The question answering model is finished and unit tests are added:
The sign-off tests was still failing, because of two incorrect sign-offs 17 commits by old authors Vincent Zhao and xinyual. Is there a way to resolve it? Thanks! |
@faradawn DCO is missing. |
Looks like you added some other commits in your PR. Please fix that. Let me know if you are facing any issue on this. |
Got it, Dhurbo! I plan to create a new branch from the current main, and commit files there, to solve the DCO issue! |
Created a new branch off main to solve the sign off issue. The new PR is here: #349. |
Description
Added a script to trace a Question Answering models to TorchScript and Onnx format.
Issues Resolved
#304 which is [FEATURE] Trace Question Answering models to TorchScript and Onnx format.
Test
I created three tests to check if the traced model's answer matched the official model's answer.
Both the onnx and pt format passed.
Check List
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.