Model Upload Workflow: Tracing-Uploading-Releasing #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Model Auto-tracing & Uploading | |
on: | |
workflow_dispatch: | |
inputs: | |
model_id: | |
description: "Model ID for auto-tracing and uploading (e.g. sentence-transformers/msmarco-distilbert-base-tas-b)" | |
required: true | |
type: string | |
model_version: | |
description: "Model version number (e.g. 1.0.1)" | |
required: true | |
type: string | |
tracing_format: | |
description: "Model format for auto-tracing" | |
required: true | |
type: choice | |
options: | |
- "Both" | |
- "TORCH_SCRIPT" | |
- "ONNX" | |
embedding_dimension: | |
description: "(Optional) You can add the embedding dimension of the model here if it does not exist in original config.json file. Else, it will use 768." | |
required: false | |
type: int | |
pooling_mode: | |
description: "(Optional) You can specify the pooling mode of the model here if it does not exist in original config.json file." | |
required: false | |
type: choice | |
options: | |
- "" | |
- "CLS" | |
- "MEAN" | |
- "MAX" | |
- "MEAN_SQRT_LEN" | |
jobs: | |
model-tracing: | |
name: model-tracing | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
cluster: ["opensearch"] | |
secured: ["true"] | |
entry: | |
- { opensearch_version: 2.7.0 } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Export Arguments | |
run: | | |
echo "MODEL_ID=${{ github.event.inputs.model_id }}" >> $GITHUB_ENV | |
echo "MODEL_VERSION::${{ github.event.inputs.model_version }}" >> $GITHUB_ENV | |
echo "TRACING_FORMAT::${{ github.event.inputs.tracing_format }}" >> $GITHUB_ENV | |
echo "EMBEDDING_DIMENSIONS::${{ github.event.inputs.embedding_dimensions }}" >> $GITHUB_ENV | |
echo "POOLING_MODE::${{ github.event.inputs.pooling_mode }}" >> $GITHUB_ENV | |
- name: Autotracing ${v{ matrix.cluster }} secured=${{ matrix.secured }} version=${{matrix.entry.opensearch_version}} | |
run: "./.ci/run-tests ${{ matrix.cluster }} ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }}" |