-
Notifications
You must be signed in to change notification settings - Fork 1.2k
563 lines (520 loc) · 22.4 KB
/
framework-e2e.yml
File metadata and controls
563 lines (520 loc) · 22.4 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
name: Framework E2E
on:
push:
branches:
- main
- 'release/framework-*'
pull_request:
branches:
- main
- 'release/framework-*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
FLWR_TELEMETRY_ENABLED: 0
ARTIFACT_BUCKET: artifact.flower.ai
jobs:
changes:
runs-on: ubuntu-22.04
outputs:
framework: ${{ steps.filter.outputs.framework }}
steps:
- uses: actions/checkout@v5
- name: Filter changed paths
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
framework:
- 'framework/**/*'
- 'src/**/*'
- '.github/workflows/framework.yml'
- '.github/workflows/framework-e2e.yml'
wheel:
runs-on: ubuntu-22.04
name: Build, test and upload wheel
steps:
- uses: actions/checkout@v5
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Install dependencies
run: |
cd framework
python -m poetry install --all-extras
- name: Build wheel
run: ./framework/dev/build.sh
- name: Test wheel
run: ./framework/dev/test-wheel.sh
- name: Upload wheel
if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
id: upload
env:
AWS_DEFAULT_REGION: ${{ secrets.ARTIFACT_AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACT_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACT_AWS_SECRET_KEY_ID }}
run: |
cd ./framework/dist
echo "WHL_PATH=$(ls *.whl)" >> "$GITHUB_OUTPUT"
sha_short=$(git rev-parse --short HEAD)
echo "SHORT_SHA=$sha_short" >> "$GITHUB_OUTPUT"
[ -z "${{ github.head_ref }}" ] && dir="${{ github.ref_name }}" || dir="pr/${{ github.head_ref }}"
echo "DIR=$dir" >> "$GITHUB_OUTPUT"
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./ s3://${{ secrets.ARTIFACT_AWS_BUCKET_NAME }}/py/$dir/$sha_short --recursive
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./ s3://${{ secrets.ARTIFACT_AWS_BUCKET_NAME }}/py/$dir/latest --recursive
outputs:
whl_path: ${{ steps.upload.outputs.WHL_PATH }}
short_sha: ${{ steps.upload.outputs.SHORT_SHA }}
dir: ${{ steps.upload.outputs.DIR }}
superexec:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
directory: [e2e-bare-auth]
connection: [secure, insecure]
engine: [deployment-engine, simulation-engine]
authentication: [no-auth, client-auth]
exclude:
- connection: insecure
authentication: client-auth
name: |
Control API /
Python ${{ matrix.python-version }} /
${{ matrix.connection }} /
${{ matrix.authentication }} /
${{ matrix.engine }}
defaults:
run:
working-directory: framework/e2e/${{ matrix.directory }}
steps:
- uses: actions/checkout@v5
- name: Bootstrap
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: ./.github/actions/bootstrap
with:
python-version: ${{ matrix.python-version }}
poetry-skip: 'true'
- name: Install Flower from repo
if: ${{ needs.changes.outputs.framework == 'true' && (github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]') }}
working-directory: ./framework
run: |
if [[ "${{ matrix.engine }}" == "simulation-engine" ]]; then
python -m pip install ".[simulation]"
else
python -m pip install .
fi
- name: Download and install Flower wheel from artifact store
if: ${{ needs.changes.outputs.framework == 'true' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
# Define base URL for wheel file
WHEEL_URL="https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}"
if [[ "${{ matrix.engine }}" == "simulation-engine" ]]; then
python -m pip install "flwr[simulation] @ ${WHEEL_URL}"
else
python -m pip install "${WHEEL_URL}"
fi
- name: >
Run Control API test /
${{ matrix.connection }} /
${{ matrix.authentication }} /
${{ matrix.engine }}
if: ${{ needs.changes.outputs.framework == 'true' }}
working-directory: framework/e2e/${{ matrix.directory }}
run: ./../test_control_api.sh "${{ matrix.connection }}" "${{ matrix.authentication}}" "${{ matrix.engine }}"
frameworks:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
# Using approach described here:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
strategy:
matrix:
include:
- directory: e2e-bare
e2e: e2e_bare
- directory: e2e-bare-https
e2e: e2e_bare_https
- directory: e2e-bare-auth
e2e: e2e_bare_auth
- directory: e2e-jax
e2e: e2e_jax
- directory: e2e-pytorch
e2e: e2e_pytorch
dataset: |
from torchvision.datasets import CIFAR10
CIFAR10('./data', download=True)
- directory: e2e-tensorflow
e2e: e2e_tensorflow
dataset: |
import tensorflow as tf
tf.keras.datasets.cifar10.load_data()
- directory: e2e-opacus
e2e: e2e_opacus
dataset: |
from torchvision.datasets import CIFAR10
CIFAR10('./data', download=True)
- directory: e2e-pytorch-lightning
e2e: e2e_pytorch_lightning
- directory: e2e-scikit-learn
e2e: e2e_scikit_learn
- directory: e2e-fastai
e2e: e2e_fastai
dataset: |
from fastai.vision.all import untar_data, URLs
untar_data(URLs.MNIST)
- directory: e2e-pandas
e2e: e2e_pandas
dataset: |
from pathlib import Path
from sklearn.datasets import load_iris
Path('data').mkdir(exist_ok=True)
load_iris(as_frame=True)['data'].to_csv('./data/client.csv')
name: Framework / ${{ matrix.directory }}
defaults:
run:
working-directory: framework/e2e/${{ matrix.directory }}
steps:
- uses: actions/checkout@v5
- name: Set up Python
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install build tools
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
python -m pip install -U pip==26.0.1
shell: bash
# Using approach described here for Python location caching:
# https://blog.allenai.org/python-caching-in-github-actions-e9452698e98d
- name: Cache Python location
if: ${{ needs.changes.outputs.framework == 'true' }}
id: cache-restore-python
uses: actions/cache/restore@v4
with:
path: ${{ env.pythonLocation }}
key: pythonloc-${{ runner.os }}-${{ matrix.directory }}-${{ env.pythonLocation }}-${{ hashFiles(format('./framework/e2e/{0}/pyproject.toml', matrix.directory)) }}
- name: Install dependencies
if: ${{ needs.changes.outputs.framework == 'true' }}
run: python -m pip install --upgrade . --extra-index-url https://download.pytorch.org/whl/cpu
- name: Install Flower wheel from artifact store
if: ${{ needs.changes.outputs.framework == 'true' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
WHEEL_URL="https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}"
python -m pip install "flwr[simulation] @ ${WHEEL_URL}"
- name: Download dataset
if: ${{ needs.changes.outputs.framework == 'true' && matrix.dataset }}
run: python -c "${{ matrix.dataset }}"
- name: Run edge client test
if: ${{ needs.changes.outputs.framework == 'true' && matrix.directory != 'e2e-bare-auth' }}
working-directory: framework/e2e/${{ matrix.directory }}/${{ matrix.e2e }}
run: ./../../test_legacy.sh "${{ matrix.directory }}"
- name: Run virtual client test
if: ${{ needs.changes.outputs.framework == 'true' && matrix.directory != 'e2e-bare-auth' }}
run: python simulation.py
- name: Run simulation engine test
if: ${{ needs.changes.outputs.framework == 'true' && (matrix.directory == 'e2e-pytorch' || matrix.directory == 'e2e-tensorflow') }}
run: python simulation_next.py
- name: Run driver test
if: ${{ needs.changes.outputs.framework == 'true' && matrix.directory != 'e2e-bare-auth' }}
run: ./../test_superlink.sh "${{ matrix.directory }}"
- name: Run driver test with REST
if: ${{ needs.changes.outputs.framework == 'true' && matrix.directory == 'e2e-bare' }}
run: ./../test_superlink.sh bare rest
- name: Run driver test with SQLite database
if: ${{ needs.changes.outputs.framework == 'true' && matrix.directory == 'e2e-bare' }}
run: ./../test_superlink.sh bare sqlite
- name: Run driver test with client authentication
if: ${{ needs.changes.outputs.framework == 'true' && matrix.directory == 'e2e-bare-auth' }}
run: ./../test_superlink.sh "${{ matrix.directory }}" client-auth
# - name: Run reconnection test with SQLite database (Temporarily disabled due to in-memory ObjectStore)
# if: ${{ needs.changes.outputs.framework == 'true' && matrix.directory == 'e2e-bare' }}
# run: ./../test_reconnection.sh sqlite
- name: Cache save Python location
id: cache-save-python
uses: actions/cache/save@v4
if: ${{ needs.changes.outputs.framework == 'true' && github.ref_name == 'main' && !steps.cache-restore-python.outputs.cache-hit }}
with:
path: ${{ env.pythonLocation }}
key: pythonloc-${{ runner.os }}-${{ matrix.directory }}-${{ env.pythonLocation }}-${{ hashFiles(format('./framework/e2e/{0}/pyproject.toml', matrix.directory)) }}
strategies:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
strategy:
matrix:
strat: ["FedMedian", "FedTrimmedAvg", "QFedAvg", "FaultTolerantFedAvg", "FedAvgM", "FedAdam", "FedAdagrad", "FedYogi"]
name: Strategy / ${{ matrix.strat }}
defaults:
run:
working-directory: framework/e2e/strategies
steps:
- uses: actions/checkout@v5
- name: Bootstrap
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: ./.github/actions/bootstrap
- name: Install dependencies
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
python -m poetry install --only main
- name: Install Flower wheel from artifact store
if: ${{ needs.changes.outputs.framework == 'true' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
WHEEL_URL="https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}"
python -m pip install "flwr[simulation] @ ${WHEEL_URL}"
- name: Cache Datasets
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: actions/cache@v4
with:
path: "~/.keras"
key: keras-datasets
- name: Download Datasets
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
python -c "import tensorflow as tf; tf.keras.datasets.mnist.load_data()"
- name: Test strategies
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
python test.py "${{ matrix.strat }}"
apps:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
strategy:
matrix:
include:
- example: quickstart-pytorch
- example: quickstart-tensorflow
- example: quickstart-jax
- example: quickstart-sklearn
- example: quickstart-numpy
- example: quickstart-pytorch-deprecated
name: App / ${{ matrix.example }}
steps:
- uses: actions/checkout@v5
- name: Bootstrap
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: ./.github/actions/bootstrap
- name: Install Flower from repo
if: ${{ needs.changes.outputs.framework == 'true' && (github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]') }}
run: |
cd framework
python -m pip install .
- name: Install Flower wheel from artifact store
if: ${{ needs.changes.outputs.framework == 'true' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
WHEEL_URL="https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}"
python -m pip install "flwr[simulation] @ ${WHEEL_URL}"
- name: Install project dependencies
if: ${{ needs.changes.outputs.framework == 'true' }}
working-directory: examples/${{ matrix.example }}
run: |
sed -i 's/"flwr\[[^]]*\][^"]*", *//g' pyproject.toml
# Replace tensorflow with tensorflow-cpu to avoid GPU warnings in CI
sed -i 's/"tensorflow\([^"]*\)"/"tensorflow-cpu\1"/g' pyproject.toml
pip install flwr[simulation]
pip install . --extra-index-url https://download.pytorch.org/whl/cpu
- name: Run project
if: ${{ needs.changes.outputs.framework == 'true' }}
working-directory: examples/${{ matrix.example }}
run: |
flwr run --run-config num-server-rounds=1 --stream 2>&1 | tee flwr_output.log
if grep -q "ERROR" flwr_output.log; then
exit 1
fi
pull-app:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
env:
ACCOUNT: 'flwrlabs'
APP_NAME: 'numpy-ci'
name: flwr new @
steps:
- uses: actions/checkout@v5
- name: Bootstrap
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: ./.github/actions/bootstrap
- name: Install Flower from repo
if: ${{ needs.changes.outputs.framework == 'true' && (github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]') }}
run: |
cd framework
python -m pip install .
- name: Install Flower wheel from artifact store
if: ${{ needs.changes.outputs.framework == 'true' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
WHEEL_URL="https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}"
python -m pip install "flwr[simulation] @ ${WHEEL_URL}"
- name: Create project and install it
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
flwr new @$ACCOUNT/$APP_NAME
cd $APP_NAME
pip install .
- name: Run project
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
cd $APP_NAME
flwr run . --run-config num-server-rounds=1 --stream 2>&1 | tee flwr_output.log
if grep -q "ERROR" flwr_output.log; then
exit 1
fi
build_and_install:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
strategy:
matrix:
framework: ["numpy"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: |
Build & Install /
Python ${{ matrix.python-version }} /
${{ matrix.framework }}
steps:
- uses: actions/checkout@v5
- name: Bootstrap
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: ./.github/actions/bootstrap
with:
python-version: ${{ matrix.python-version }}
poetry-skip: 'true'
- name: Install Flower from repo
if: ${{ needs.changes.outputs.framework == 'true' && (github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]') }}
run: |
cd framework
python -m pip install .
- name: Install Flower wheel from artifact store
if: ${{ needs.changes.outputs.framework == 'true' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
WHEEL_URL="https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}"
python -m pip install "flwr[simulation] @ ${WHEEL_URL}"
- name: Create project, build, and install it
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
flwr new @flwrlabs/numpy-ci
cd numpy-ci
flwr build
flwr install *.fab
numpy:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
strategy:
fail-fast: false
matrix:
numpy-version: ["1.26"]
python-version: ["3.11"]
directory: [e2e-bare-auth]
connection: [insecure]
engine: [deployment-engine, simulation-engine]
authentication: [no-auth]
name: |
NumPy ${{ matrix.numpy-version }} /
Python ${{ matrix.python-version }} /
${{ matrix.connection }} /
${{ matrix.authentication }} /
${{ matrix.engine }}
defaults:
run:
working-directory: framework/e2e/${{ matrix.directory }}
steps:
- uses: actions/checkout@v5
- name: Bootstrap
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: ./.github/actions/bootstrap
with:
python-version: ${{ matrix.python-version }}
poetry-skip: 'true'
- name: Install Flower from repo
if: ${{ needs.changes.outputs.framework == 'true' && (github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]') }}
working-directory: ./framework
run: |
if [[ "${{ matrix.engine }}" == "simulation-engine" ]]; then
python -m pip install ".[simulation]" "numpy>=${{ matrix.numpy-version }},<2.0"
else
python -m pip install . "numpy>=${{ matrix.numpy-version }},<2.0"
fi
- name: Download and install Flower wheel from artifact store
if: ${{ needs.changes.outputs.framework == 'true' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
# Define base URL for wheel file
WHEEL_URL="https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}"
if [[ "${{ matrix.engine }}" == "simulation-engine" ]]; then
python -m pip install "flwr[simulation] @ ${WHEEL_URL}" "numpy>=${{ matrix.numpy-version }},<2.0"
else
python -m pip install "${WHEEL_URL}" "numpy>=${{ matrix.numpy-version }},<2.0"
fi
- name: >
Run Flower - NumPy 1.26 test /
${{ matrix.connection }} /
${{ matrix.authentication }} /
${{ matrix.engine }}
if: ${{ needs.changes.outputs.framework == 'true' }}
working-directory: framework/e2e/${{ matrix.directory }}
run: ./../test_control_api.sh "${{ matrix.connection }}" "${{ matrix.authentication}}" "${{ matrix.engine }}"
windows-compatibility:
runs-on: windows-latest
env:
PYTHONIOENCODING: utf-8
timeout-minutes: 10
needs: [changes, wheel]
name: Windows compatibility test
steps:
- uses: actions/checkout@v5
- name: Set up Python
if: ${{ needs.changes.outputs.framework == 'true' }}
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install build tools
if: ${{ needs.changes.outputs.framework == 'true' }}
run: python -m pip install -U pip==26.0.1
- name: Install dependencies
if: ${{ needs.changes.outputs.framework == 'true' }}
run: |
cd framework
python -m pip install --upgrade .
- name: Run test
if: ${{ needs.changes.outputs.framework == 'true' }}
working-directory: ./framework/e2e
run: ./test_windows.sh
shell: bash
serverapp-heartbeat-test:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: [changes, wheel]
strategy:
matrix:
engine: [deployment, simulation]
python-version: ["3.10"]
if: ${{ needs.changes.outputs.framework == 'true' }}
name: |
ServerApp/run heartbeat test with ${{ matrix.engine }} runtime /
Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install build tools
run: python -m pip install -U pip==26.0.1
- name: Overwrite ping interval and patience
run: |
sed -i 's/\(HEARTBEAT_DEFAULT_INTERVAL *= *\).*/\120/' framework/py/flwr/common/constant.py
sed -i 's/\(HEARTBEAT_PATIENCE *= *\).*/\11/' framework/py/flwr/common/constant.py
- name: Install dependencies
run: |
cd framework
python -m pip install --upgrade .[simulation]
- name: Run test
working-directory: ./framework/e2e/e2e-serverapp-heartbeat
run: python ../test_serverapp_heartbeat.py ${{ matrix.engine }}
shell: bash