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 text embedding API example doc #710

Merged
merged 2 commits into from
Jan 25, 2023

Conversation

ylwu-amzn
Copy link
Collaborator

Signed-off-by: Yaliang Wu ylwu@amazon.com

Description

Add text embedding API example doc

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.

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
@ylwu-amzn ylwu-amzn requested a review from a team January 25, 2023 01:25
rbhavna
rbhavna previously approved these changes Jan 25, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2023

Codecov Report

Merging #710 (db760fd) into 2.x (1ba4de8) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                2.x     #710   +/-   ##
=========================================
  Coverage     84.34%   84.34%           
  Complexity     1052     1052           
=========================================
  Files            99       99           
  Lines          3833     3833           
  Branches        352      352           
=========================================
  Hits           3233     3233           
  Misses          450      450           
  Partials        150      150           
Flag Coverage Δ
ml-commons 84.34% <ø> (ø)

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

Impacted Files Coverage Δ
...n/java/org/opensearch/ml/cluster/MLSyncUpCron.java 84.41% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

We can trace this example model [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) to torchscript with two options:

## 1.1 trace sentence transformers model
If you have [`sentence-transformers`](https://pypi.org/project/sentence-transformers/) installed. You can trace this model directly: `SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think model = SentenceTransformer('all-MiniLM-L6-v2') will trace the model.

Copy link
Collaborator

Choose a reason for hiding this comment

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

how about:

If you have sentence-transformers installed. You can save this model directly: SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') and then trace the model using torchScipt.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, sounds good

dhrubo-os
dhrubo-os previously approved these changes Jan 25, 2023
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
@ylwu-amzn ylwu-amzn dismissed stale reviews from dhrubo-os and rbhavna via 148c587 January 25, 2023 01:58
@ylwu-amzn ylwu-amzn merged commit 3992d93 into opensearch-project:2.x Jan 25, 2023
@ylwu-amzn ylwu-amzn added the documentation Improvements or additions to documentation label Jan 31, 2023
ylwu-amzn added a commit to ylwu-amzn/ml-commons that referenced this pull request Feb 17, 2023
* add text embedding API example doc

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

* address comment

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
ylwu-amzn added a commit to ylwu-amzn/ml-commons that referenced this pull request Mar 3, 2023
* add text embedding API example doc

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

* address comment

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
ylwu-amzn added a commit to ylwu-amzn/ml-commons that referenced this pull request Mar 3, 2023
* add text embedding API example doc

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

* address comment

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
ylwu-amzn added a commit to ylwu-amzn/ml-commons that referenced this pull request Mar 3, 2023
* add text embedding API example doc

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

* address comment

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
ylwu-amzn added a commit that referenced this pull request Mar 4, 2023
* add text embedding API example doc

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

* address comment

Signed-off-by: Yaliang Wu <ylwu@amazon.com>

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants