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 config parameters for traced models #3456

Merged
merged 5 commits into from
Apr 12, 2023

Conversation

Naarcha-AWS
Copy link
Collaborator

Fixes #2566

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
@Naarcha-AWS Naarcha-AWS added backport 2.5 PR: Backport label for 2.5 backport 2.6 PR: Backport label for 2.6 labels Mar 15, 2023
@Naarcha-AWS Naarcha-AWS requested a review from a team as a code owner March 15, 2023 16:02
@Naarcha-AWS Naarcha-AWS added the 3 - Tech review PR: Tech review in progress label Mar 15, 2023
@Naarcha-AWS Naarcha-AWS self-assigned this Mar 15, 2023
@Naarcha-AWS Naarcha-AWS added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels Apr 12, 2023
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@cwillum cwillum left a comment

Choose a reason for hiding this comment

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

Just a couple of comments. Looks good.

@@ -68,6 +68,13 @@ Field | Data type | Description
| `framework_type` | string | The framework the model is using. Currently, we support `sentence_transformers` and `huggingface_transformers` frameworks. The `sentence_transformers` model outputs text embeddings directly, so ML Commons does not perform any post processing. For `huggingface_transformers`, ML Commons performs post processing by applying mean pooling to get text embeddings. See the example [`all-MiniLM-L6-v2` Huggingface model](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) for more details. |
| `all_config` _(Optional)_ | string | This field is used for reference purposes. You can specify all model configurations in this field. For example, if you are using a Huggingface model, you can minify the `config.json` file to one line and save its contents in the `all_config` field. Once the model is uploaded, you can use the get model API operation to get all model configurations stored in this field. |

You can further customize a sentence transformer pre-trained model's post-processing logic with the following optional fields in the `model_config` object.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does "... pre-trained sentence transformer model's post-processing logic ..." preserve the meaning of this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. I'll adjust.


| Field | Data type | Description |
| :--- | :--- | :--- |
| `pooling_mode` | string | The post-process model output, either `mean`, `mean_sqrt_len`, `max`, `weightedmean`, or `cls`.|
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't tell you why. But we typically capitalize data types: String, Boolean.

@Naarcha-AWS Naarcha-AWS merged commit fa643f9 into main Apr 12, 2023
@Naarcha-AWS Naarcha-AWS deleted the ml-commons-cluster-settings-new branch April 12, 2023 16:30
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 12, 2023
* Add config parameters for traced models

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

---------

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
(cherry picked from commit fa643f9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 12, 2023
* Add config parameters for traced models

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

---------

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
(cherry picked from commit fa643f9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Naarcha-AWS pushed a commit that referenced this pull request Apr 12, 2023
* Add config parameters for traced models



* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

---------


(cherry picked from commit fa643f9)

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Naarcha-AWS pushed a commit that referenced this pull request Apr 12, 2023
* Add config parameters for traced models



* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

---------


(cherry picked from commit fa643f9)

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vagimeli pushed a commit that referenced this pull request Apr 25, 2023
* Add config parameters for traced models

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

---------

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
vagimeli added a commit that referenced this pull request Apr 25, 2023
vagimeli pushed a commit that referenced this pull request May 4, 2023
* Add config parameters for traced models

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

---------

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
vagimeli added a commit that referenced this pull request May 4, 2023
harshavamsi pushed a commit to harshavamsi/documentation-website that referenced this pull request Oct 31, 2023
* Add config parameters for traced models

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

* Update model-serving-framework.md

---------

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Doc review PR: Doc review in progress backport 2.5 PR: Backport label for 2.5 backport 2.6 PR: Backport label for 2.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] [ml-commons] add new model config parameters
4 participants