-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.38 KB
/
predict-parallel.yml
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
51
52
53
54
55
56
57
58
59
60
61
name: Run Inference in Parallel
on:
workflow_dispatch:
inputs:
model-id:
required: true
type: string
sample-only:
required: false
type: string
n-workers:
description: 'number of workers to use (max 50)'
required: true
default: '50'
type: string
permissions:
contents: read
jobs:
start-time:
runs-on: ubuntu-latest
outputs:
start-time: ${{ steps.start-time.outputs.start-time }}
steps:
- name: Get start time
id: start-time
run: echo "start-time=$(date +%s)" >> "$GITHUB_OUTPUT"
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
start='1'
end=${{ inputs.n-workers }}
matrix=$(seq -s ',' $start $end)
echo "matrix=[${matrix}]" >> $GITHUB_OUTPUT
matrix-inference:
needs: generate-matrix
if: github.repository != 'ersilia-os/eos-template'
strategy:
matrix:
numerator: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
uses: ./.github/workflows/predict.yml
with:
numerator: ${{ matrix.numerator }}
denominator: ${{ inputs.n-workers }}
model-id: ${{ inputs.model-id }}
sample-only: ${{ inputs.sample-only }}
SHA: ${{ github.sha }}
secrets: inherit