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

Generalize make_model_config_json function #200

Merged

Conversation

thanawan-atc
Copy link
Contributor

@thanawan-atc thanawan-atc commented Jul 26, 2023

Description

The module (i.e., Pooling, Normalize) does not need to be at the same index in SentenceTransformer._modules. So, we need to modify some code to handle those cases.

Check List

  • 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: Thanawan Atchariyachanvanit <latchari@amazon.com>
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #200 (9b9adfb) into main (0a0fa63) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #200   +/-   ##
=======================================
  Coverage   91.15%   91.15%           
=======================================
  Files          37       37           
  Lines        4091     4092    +1     
=======================================
+ Hits         3729     3730    +1     
  Misses        362      362           
Files Changed Coverage Δ
...search_py_ml/ml_models/sentencetransformermodel.py 71.35% <100.00%> (+0.07%) ⬆️

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
@thanawan-atc thanawan-atc changed the title Improve make_model_config Generalize make_model_config_json function Jul 26, 2023
Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
@dhrubo-os dhrubo-os merged commit 513ac11 into opensearch-project:main Jul 27, 2023
13 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 9, 2023
* Improve make_model_config

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
(cherry picked from commit 513ac11)
dhrubo-os pushed a commit that referenced this pull request Aug 10, 2023
* Improve make_model_config

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
(cherry picked from commit 513ac11)

Co-authored-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
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