-
Notifications
You must be signed in to change notification settings - Fork 235
Expand file tree
/
Copy pathtask_runner_fedeval_dws_e2e.yml
More file actions
182 lines (159 loc) · 5.84 KB
/
task_runner_fedeval_dws_e2e.yml
File metadata and controls
182 lines (159 loc) · 5.84 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
---
# Task Runner E2E Evaluation tests for dockerized approach
name: Task_Runner_FedEval_DWS_E2E # Please do not modify the name as it is used in the composite action
on:
workflow_dispatch:
inputs:
num_rounds:
description: "Number of rounds to train"
required: false
default: "5"
type: string
num_collaborators:
description: "Number of collaborators"
required: false
default: "2"
type: string
job_to_run:
description: "Job to run (tls, non_tls, no_client_auth, all)"
required: true
default: "all"
type: choice
options:
- tls
- non_tls
- no_client_auth
- all
permissions:
contents: read
# Environment variables common for all the jobs
env:
NUM_ROUNDS: ${{ inputs.num_rounds || '5' }}
NUM_COLLABORATORS: ${{ inputs.num_collaborators || '2' }}
JOB_TO_RUN: ${{ inputs.job_to_run || 'all' }}
jobs:
input_selection:
if: |
(github.event_name == 'schedule' && github.repository_owner == 'securefederatedai') ||
(github.event_name == 'workflow_dispatch')
name: Input value selection
runs-on: ubuntu-22.04
outputs:
selected_jobs: ${{ env.JOB_TO_RUN }}
steps:
- name: Job to select input values
id: input_selection
run: |
echo "jobs_to_run=${{ env.JOBS_TO_RUN }}"
test_with_tls:
name: With TLS
needs: input_selection
runs-on: ubuntu-22.04
timeout-minutes: 15
if: needs.input_selection.outputs.selected_jobs == 'tls' || needs.input_selection.outputs.selected_jobs == 'all'
strategy:
matrix:
# IMP: Models requiring higher config might fail on current GitHub runners due to resource constraints.
model_name: ["keras/mnist", "keras/jax/mnist", "keras/torch/mnist"]
python_version: ["3.10"]
fail-fast: false # do not immediately fail if one of the combinations fail
env:
MODEL_NAME: ${{ matrix.model_name }}
PYTHON_VERSION: ${{ matrix.python_version }}
steps:
- name: Checkout OpenFL repository
id: checkout_openfl
uses: actions/checkout@v6
with:
fetch-depth: 2 # needed for detecting changes
submodules: "true"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Pre test run
uses: ./.github/actions/tr_pre_test_run
if: ${{ always() }}
- name: Run Task Runner E2E tests with TLS
id: run_tests
run: |
python -m pytest -s tests/end_to_end/test_suites/tr_with_fedeval_tests.py \
-m task_runner_dockerized_ws --model_name ${{ env.MODEL_NAME }} \
--num_rounds ${{ env.NUM_ROUNDS }} --num_collaborators ${{ env.NUM_COLLABORATORS }}
echo "Task runner end to end test run completed"
- name: Post test run
uses: ./.github/actions/tr_post_test_run
if: ${{ always() }}
with:
test_type: "DWS_FedEval_With_TLS"
test_without_tls:
name: Without TLS
needs: input_selection
runs-on: ubuntu-22.04
timeout-minutes: 15
if: needs.input_selection.outputs.selected_jobs == 'non_tls' || needs.input_selection.outputs.selected_jobs == 'all'
strategy:
matrix:
model_name: ["keras/mnist"]
python_version: ["3.10"]
fail-fast: false # do not immediately fail if one of the combinations fail
env:
MODEL_NAME: ${{ matrix.model_name }}
PYTHON_VERSION: ${{ matrix.python_version }}
steps:
- name: Checkout OpenFL repository
id: checkout_openfl
uses: actions/checkout@v6
with:
fetch-depth: 2 # needed for detecting changes
submodules: "true"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Pre test run
uses: ./.github/actions/tr_pre_test_run
if: ${{ always() }}
- name: Run Task Runner E2E tests without TLS
id: run_tests
run: |
python -m pytest -s tests/end_to_end/test_suites/tr_with_fedeval_tests.py \
-m task_runner_dockerized_ws --model_name ${{ env.MODEL_NAME }} \
--num_rounds ${{ env.NUM_ROUNDS }} --num_collaborators ${{ env.NUM_COLLABORATORS }} --disable_tls
echo "Task runner end to end test run completed"
- name: Post test run
uses: ./.github/actions/tr_post_test_run
if: ${{ always() }}
with:
test_type: "DWS_FedEval_Without_TLS"
test_without_client_auth:
name: Without Client Auth
needs: input_selection
runs-on: ubuntu-22.04
timeout-minutes: 15
if: needs.input_selection.outputs.selected_jobs == 'no_client_auth' || needs.input_selection.outputs.selected_jobs == 'all'
strategy:
matrix:
model_name: ["keras/mnist"]
python_version: ["3.10"]
fail-fast: false # do not immediately fail if one of the combinations fail
env:
MODEL_NAME: ${{ matrix.model_name }}
PYTHON_VERSION: ${{ matrix.python_version }}
steps:
- name: Checkout OpenFL repository
id: checkout_openfl
uses: actions/checkout@v6
with:
fetch-depth: 2 # needed for detecting changes
submodules: "true"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Pre test run
uses: ./.github/actions/tr_pre_test_run
if: ${{ always() }}
- name: Run Task Runner E2E tests without TLS
id: run_tests
run: |
python -m pytest -s tests/end_to_end/test_suites/tr_with_fedeval_tests.py \
-m task_runner_dockerized_ws --model_name ${{ env.MODEL_NAME }} \
--num_rounds ${{ env.NUM_ROUNDS }} --num_collaborators ${{ env.NUM_COLLABORATORS }} --disable_client_auth
echo "Task runner end to end test run completed"
- name: Post test run
uses: ./.github/actions/tr_post_test_run
if: ${{ always() }}
with:
test_type: "DWS_FedEval_Without_Client_Auth"