Skip to content

Run Inference in Parallel #22

Run Inference in Parallel

Run Inference in Parallel #22

name: Run Inference in Parallel
on:
workflow_dispatch:
inputs:
model-id:
required: true
type: string
permissions:
contents: read
jobs:
matrix-inference:
if: github.repository != 'ersilia-os/eos-template'
strategy:
matrix:
numerator: [
1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43,44,45,46,47,48,49,50
]
# numerator: [1,2]
uses: ./.github/workflows/predict.yml
with:
numerator: ${{ matrix.numerator }}
denominator: 50
model-id: ${{ inputs.model-id }}
SHA: ${{ github.sha }}
secrets: inherit
trigger-serve-pipeline:
needs: matrix-inference
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
repository: ersilia-os/model-inference-pipeline
event-type: dispatch-serving-after-prediction
client-payload: '{"model-id": "${{ inputs.model-id }}", "sha": "${{ github.sha }}"}'