Skip to content

Commit d1d968d

Browse files
authored
[Fix] Model uploader's jekins trigger parameter fix (#402)
* [Feature] Add a workflow parameter that model uploader can specific a customize prefix. Signed-off-by: conggguan <[email protected]> * [Fix] To fix the Jekins trigger's wrong folder parameters bug. Signed-off-by: conggguan <[email protected]> * [Comments] Add a comments for model uploader workflow's [Initiate folders]. Signed-off-by: conggguan <[email protected]> --------- Signed-off-by: conggguan <[email protected]>
1 parent 026ac2a commit d1d968d

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

.github/workflows/model_uploader.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,25 @@ jobs:
7474
echo "This workflow should only be triggered on 'main' branch"
7575
exit 1
7676
- name: Initiate folders
77+
# This scripts init the folders path variables.
78+
# 1. Retrieves the input model_id.
79+
# 2. If upload_prefix is provided, constructs model_prefix using upload_prefix and model_source.
80+
# - model_prefix: "ml-models/{model_source}/{upload_prefix}"
81+
# 3. If upload_prefix is not provided, it constructs model_prefix using model_source and the prefix part of model_id.
82+
# - The prefix part is the substring before the first '/' in model_id.
83+
# Example:
84+
# - Given model_id: "opensearch-project/opensearch-neural-sparse-encoding-v1"
85+
# - model_prefix: "ml-models/{model_source}/opensearch-project"
86+
# 4. Constructs model_folder and model_prefix_folder.
7787
id: init_folders
7888
run: |
7989
model_id=${{ github.event.inputs.model_id }}
80-
echo "model_folder=ml-models/${{github.event.inputs.model_source}}/${model_id}" >> $GITHUB_OUTPUT
8190
if [[ -n "${{ github.event.inputs.upload_prefix }}" ]]; then
8291
model_prefix="ml-models/${{ github.event.inputs.model_source }}/${{ github.event.inputs.upload_prefix }}"
8392
else
8493
model_prefix="ml-models/${{ github.event.inputs.model_source }}/${model_id%%/*}"
8594
fi
95+
echo "model_folder=$model_prefix/${model_id##*/}" >> $GITHUB_OUTPUT
8696
echo "model_prefix_folder=$model_prefix" >> $GITHUB_OUTPUT
8797
- name: Initiate workflow_info
8898
id: init_workflow_info
@@ -446,4 +456,4 @@ jobs:
446456
version=${{ github.event.inputs.model_version }}
447457
format=${{ github.event.inputs.tracing_format }}
448458
jenkins_params="{\"BASE_DOWNLOAD_PATH\":\"$base_download_path\", \"VERSION\":\"$version\", \"FORMAT\":\"$format\"}"
449-
sh utils/model_uploader/trigger_ml_models_release.sh $jenkins_trigger_token "$jenkins_params"
459+
sh utils/model_uploader/trigger_ml_models_release.sh $jenkins_trigger_token "$jenkins_params"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
4040
- Removed pandas version pin in nox tests by @rawwar ([#368](https://github.com/opensearch-project/opensearch-py-ml/pull/368))
4141
- Switch AL2 to AL2023 agent and DockerHub to ECR images in ml-models.JenkinsFile ([#377](https://github.com/opensearch-project/opensearch-py-ml/pull/377))
4242
- Refactored validators in ML Commons' client([#385](https://github.com/opensearch-project/opensearch-py-ml/pull/385))
43-
- Update model upload history - opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill (v.1.0.0)(TORCH_SCRIPT) by @dhrubo-os ([#400](https://github.com/opensearch-project/opensearch-py-ml/pull/400))
4443

4544
### Fixed
45+
- Fix the wrong input parameter for model_uploader's base_download_path in jekins trigger.([#402](https://github.com/opensearch-project/opensearch-py-ml/pull/402))
4646
- Enable make_model_config_json to add model description to model config file by @thanawan-atc in ([#203](https://github.com/opensearch-project/opensearch-py-ml/pull/203))
4747
- Correct demo_ml_commons_integration.ipynb by @thanawan-atc in ([#208](https://github.com/opensearch-project/opensearch-py-ml/pull/208))
4848
- Handle the case when the model max length is undefined in tokenizer by @thanawan-atc in ([#219](https://github.com/opensearch-project/opensearch-py-ml/pull/219))

utils/model_uploader/upload_history/MODEL_UPLOAD_HISTORY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ The following table shows sentence transformer model upload history.
2020
|2023-08-31 15:22:19|@dhrubo-os|`sentence-transformers/msmarco-distilbert-base-tas-b`|1.0.2|TORCH_SCRIPT|N/A|N/A|6042401385|
2121
|2023-09-13 18:03:32|@dhrubo-os|`sentence-transformers/distiluse-base-multilingual-cased-v1`|1.0.1|TORCH_SCRIPT|N/A|N/A|6178024517|
2222
|2023-10-18 18:06:15|@dhrubo-os|`sentence-transformers/paraphrase-mpnet-base-v2`|1.0.0|ONNX|N/A|N/A|6568285400|
23-
|2023-10-18 18:06:15|@dhrubo-os|`sentence-transformers/paraphrase-mpnet-base-v2`|1.0.0|TORCH_SCRIPT|N/A|N/A|6568285400|
24-
|2024-08-06 12:42:00|@dhrubo-os|`opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill`|1.0.0|TORCH_SCRIPT|N/A|N/A|10271804648|
23+
|2023-10-18 18:06:15|@dhrubo-os|`sentence-transformers/paraphrase-mpnet-base-v2`|1.0.0|TORCH_SCRIPT|N/A|N/A|6568285400|

utils/model_uploader/upload_history/supported_models.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,5 @@
4848
"Embedding Dimension": "N/A",
4949
"Pooling Mode": "N/A",
5050
"Workflow Run ID": "6568285400"
51-
},
52-
{
53-
"Model Uploader": "@dhrubo-os",
54-
"Upload Time": "2024-08-06 12:42:00",
55-
"Model ID": "opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill",
56-
"Model Version": "1.0.0",
57-
"Model Format": "TORCH_SCRIPT",
58-
"Embedding Dimension": "N/A",
59-
"Pooling Mode": "N/A",
60-
"Workflow Run ID": "10271804648"
6151
}
6252
]

0 commit comments

Comments
 (0)