Skip to content

Commit af25e4b

Browse files
authored
Merge branch 'develop' into test-workflow-tls
2 parents 2c5b1fc + 77297d8 commit af25e4b

File tree

101 files changed

+2447
-807
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2447
-807
lines changed

.github/actions/tr_post_test_run/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
steps:
1414
- name: Print test summary
1515
id: print_test_summary
16-
if: ${{ always() }}
16+
if: success() || failure() # Run only on success or failure (i.e. not for skipped and cancelled jobs)
1717
run: |
1818
export PYTHONPATH="$PYTHONPATH:."
1919
python tests/end_to_end/utils/summary_helper.py --func_name "print_task_runner_score"
@@ -36,4 +36,4 @@ runs:
3636
if: ${{ always() }}
3737
with:
3838
name: ${{ inputs.test_type }}_${{ env.MODEL_NAME_MODIFIED }}_python${{ env.PYTHON_VERSION }}
39-
path: result.tar
39+
path: result.tar
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# Composite Action to run pre-test functions for Workflow API end to end tests
3+
4+
name: 'Pre-Test Functions for Workflow API'
5+
description: 'Run pre-test functions'
6+
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: Set up Python
11+
id: setup_python
12+
uses: actions/setup-python@v3
13+
with:
14+
python-version: ${{ env.PYTHON_VERSION }}
15+
16+
- name: Install dependencies
17+
id: install_dependencies
18+
run: |
19+
python -m pip install --upgrade pip ipython ipykernel
20+
pip install .
21+
pip install -r openfl-tutorials/experimental/workflow/workflow_interface_requirements.txt
22+
pip install -r test-requirements.txt
23+
shell: bash

.github/workflows/pq_pipeline.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ jobs:
6464
with:
6565
commit_id: ${{ needs.set_commit_id_for_all_jobs.outputs.commit_id }}
6666

67+
task_runner_connectivity_e2e:
68+
if: |
69+
(github.event_name == 'schedule' && github.repository_owner == 'securefederatedai') ||
70+
(github.event_name == 'workflow_dispatch')
71+
name: TaskRunner Connectivity E2E
72+
needs: set_commit_id_for_all_jobs
73+
uses: ./.github/workflows/task_runner_connectivity_e2e.yml
74+
with:
75+
commit_id: ${{ needs.set_commit_id_for_all_jobs.outputs.commit_id }}
76+
secrets: inherit
77+
6778
task_runner_e2e:
6879
if: |
6980
(github.event_name == 'schedule' && github.repository_owner == 'securefederatedai') ||

.github/workflows/pr_pipeline.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454
windows:
5555
name: Windows pytest coverage and workspace runs
5656
uses: ./.github/workflows/windows.yml
57+
58+
task_runner_connectivity:
59+
name: TaskRunner Connectivity E2E
60+
uses: ./.github/workflows/task_runner_connectivity_e2e.yml
5761

5862
task_runner_e2e:
5963
name: TaskRunner E2E
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
# Task Runner E2E tests to check connectivity.
3+
4+
name: Task_Runner_Connectivity_E2E # Please do not modify the name as it is used in the composite action
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
commit_id:
10+
required: false
11+
type: string
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
17+
env:
18+
COMMIT_ID: ${{ inputs.commit_id || github.sha }} # use commit_id from the calling workflow
19+
20+
jobs:
21+
test_gRPC_connectivity:
22+
name: Task Runner gRPC connectivity (no-op, 3.10)
23+
if: |
24+
(github.event_name == 'schedule' && github.repository_owner == 'securefederatedai') ||
25+
(github.event_name == 'workflow_dispatch') ||
26+
(github.event.pull_request.draft == false)
27+
runs-on: ubuntu-22.04
28+
timeout-minutes: 30
29+
env:
30+
MODEL_NAME: 'no-op'
31+
PYTHON_VERSION: '3.10'
32+
steps:
33+
- name: Checkout OpenFL repository
34+
id: checkout_openfl
35+
uses: actions/checkout@v4
36+
with:
37+
ref: ${{ env.COMMIT_ID }}
38+
39+
- name: Pre test run
40+
uses: ./.github/actions/tr_pre_test_run
41+
if: ${{ always() }}
42+
43+
- name: Run Task Runner gRPC connectivity test
44+
id: run_tests
45+
run: |
46+
python -m pytest -s tests/end_to_end/test_suites/task_runner_tests.py -k test_federation_connectivity --model_name ${{ env.MODEL_NAME }}
47+
echo "Task runner end to end test run completed"
48+
49+
- name: Post test run
50+
uses: ./.github/actions/tr_post_test_run
51+
if: ${{ always() }}
52+
with:
53+
test_type: "TLS_Connectivity_gRPC"
54+
55+
# Uncomment once Rest API PR is merged
56+
# test_rest_connectivity:
57+
# name: Task Runner Rest connectivity (no-op, 3.11, rest)
58+
# if: |
59+
# (github.event_name == 'schedule' && github.repository_owner == 'securefederatedai') ||
60+
# (github.event_name == 'workflow_dispatch') ||
61+
# (github.event.pull_request.draft == false)
62+
# runs-on: ubuntu-22.04
63+
# timeout-minutes: 30
64+
# env:
65+
# MODEL_NAME: 'no-op'
66+
# PYTHON_VERSION: '3.11'
67+
# steps:
68+
# - name: Checkout OpenFL repository
69+
# id: checkout_openfl
70+
# uses: actions/checkout@v4
71+
# with:
72+
# ref: ${{ env.COMMIT_ID }}
73+
74+
# - name: Pre test run
75+
# uses: ./.github/actions/tr_pre_test_run
76+
# if: ${{ always() }}
77+
78+
# - name: Run Task Runner rest connectivity test
79+
# id: run_tests
80+
# run: |
81+
# python -m pytest -s tests/end_to_end/test_suites/task_runner_tests.py -k test_federation_connectivity --model_name ${{ env.MODEL_NAME }} --tr_rest_api
82+
# echo "Task runner end to end test run completed"
83+
84+
# - name: Post test run
85+
# uses: ./.github/actions/tr_post_test_run
86+
# if: ${{ always() }}
87+
# with:
88+
# test_type: "TLS_Connectivity_REST"

.github/workflows/wf_functional_e2e.yml

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ jobs:
3232
name: WF Functional Without TLS
3333
runs-on: ubuntu-22.04
3434
timeout-minutes: 15
35-
strategy:
36-
matrix:
37-
python_version: ["3.10"]
38-
fail-fast: false # do not immediately fail if one of the combinations fail
35+
env:
36+
PYTHON_VERSION: '3.10'
3937

4038
steps:
4139
- name: Checkout OpenFL repository
@@ -46,19 +44,9 @@ jobs:
4644
submodules: "true"
4745
token: ${{ secrets.GITHUB_TOKEN }}
4846

49-
- name: Set up Python
50-
id: setup_python
51-
uses: actions/setup-python@v5
52-
with:
53-
python-version: ${{ matrix.python_version }}
54-
55-
- name: Install dependencies
56-
id: install_dependencies
57-
run: |
58-
python -m pip install --upgrade pip
59-
pip install .
60-
pip install -r test-requirements.txt
61-
pip install -r openfl-tutorials/experimental/workflow/workflow_interface_requirements.txt
47+
- name: Pre test run
48+
uses: ./.github/actions/wf_pre_test_run
49+
if: ${{ always() }}
6250

6351
- name: Run Work Flow Functional tests
6452
id: run_tests
@@ -86,5 +74,56 @@ jobs:
8674
uses: actions/upload-artifact@v4
8775
if: ${{ always() }}
8876
with:
89-
name: wf_func_${{ github.event.inputs.model_name || 'default_model' }}_python${{ matrix.python_version }}_${{ github.run_id }}
77+
name: wf_func_python${{ env.PYTHON_VERSION }}_${{ github.run_id }}
9078
path: result.tar
79+
80+
test_wf_ray_backend_func_tests:
81+
if: github.event.pull_request.draft == false
82+
name: WF Functional Ray Backend
83+
runs-on: ubuntu-22.04
84+
needs: test_wf_functional_local_runtime
85+
timeout-minutes: 15
86+
env:
87+
PYTHON_VERSION: '3.11'
88+
89+
steps:
90+
- name: Checkout OpenFL repository
91+
id: checkout_openfl
92+
uses: actions/checkout@v4
93+
with:
94+
fetch-depth: 2 # needed for detecting changes
95+
submodules: "true"
96+
token: ${{ secrets.GITHUB_TOKEN }}
97+
98+
- name: Pre test run
99+
uses: ./.github/actions/wf_pre_test_run
100+
if: ${{ always() }}
101+
102+
- name: Run Work Flow Functional tests (Ray Backend)
103+
id: run_tests
104+
run: |
105+
python -m pytest -s tests/end_to_end/test_suites/wf_local_func_tests.py \
106+
--num_rounds ${{ env.NUM_ROUNDS }} --num_collaborators ${{ env.NUM_COLLABORATORS }} --workflow_backend ray
107+
echo "Work Flow Functional tests run completed"
108+
109+
- name: Print test summary
110+
id: print_test_summary
111+
if: ${{ always() }}
112+
run: |
113+
export PYTHONPATH="$PYTHONPATH:."
114+
python tests/end_to_end/utils/summary_helper.py --func_name "print_local_runtime_score"
115+
echo "Test summary printed"
116+
117+
- name: Create Tar (exclude cert and data folders)
118+
id: tar_files
119+
if: ${{ always() }}
120+
run: |
121+
tar -cvf result.tar --exclude="cert" --exclude="data" --exclude="__pycache__" $HOME/results
122+
123+
- name: Upload Artifacts
124+
id: upload_artifacts
125+
uses: actions/upload-artifact@v4
126+
if: ${{ always() }}
127+
with:
128+
name: wf_func_ray_python${{ env.PYTHON_VERSION }}_${{ github.run_id }}
129+
path: result.tar

.github/workflows/wf_secagg_fed_runtime.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,17 @@ jobs:
2626
(github.event.pull_request.draft == false)
2727
runs-on: ubuntu-22.04
2828
timeout-minutes: 30
29+
env:
30+
PYTHON_VERSION: '3.11'
2931
steps:
3032
- name: Checkout OpenFL repository
3133
uses: actions/checkout@v4
3234
with:
3335
ref: ${{ env.COMMIT_ID }}
3436

35-
- name: Set up Python
36-
uses: actions/setup-python@v5
37-
with:
38-
python-version: "3.10"
39-
40-
- name: Install dependencies # Without this step, fx command will not work
41-
id: install_dependencies
42-
run: |
43-
python -m pip install --upgrade pip ipython ipykernel
44-
pip install .
45-
pip install -r test-requirements.txt
37+
- name: Pre test run
38+
uses: ./.github/actions/wf_pre_test_run
39+
if: ${{ always() }}
4640

4741
- name: Run Federated Runtime Secure aggregation via pytest
4842
id: run_tests

.github/workflows/wf_watermarking_fed_runtime.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,17 @@ jobs:
2626
(github.event.pull_request.draft == false)
2727
runs-on: ubuntu-22.04
2828
timeout-minutes: 20
29+
env:
30+
PYTHON_VERSION: '3.10'
2931
steps:
3032
- name: Checkout OpenFL repository
3133
uses: actions/checkout@v4
3234
with:
3335
ref: ${{ env.COMMIT_ID }} # use commit_id from the calling workflow
3436

35-
- name: Set up Python
36-
uses: actions/setup-python@v5
37-
with:
38-
python-version: "3.11"
39-
40-
- name: Install dependencies # Without this step, fx command will not work
41-
id: install_dependencies
42-
run: |
43-
python -m pip install --upgrade pip ipython ipykernel
44-
pip install .
45-
pip install -r test-requirements.txt
37+
- name: Pre test run
38+
uses: ./.github/actions/wf_pre_test_run
39+
if: ${{ always() }}
4640

4741
- name: Run Federated Runtime 301 MNIST Watermarking via pytest
4842
id: run_tests

.github/workflows/workflow_interface_101_mnist.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,17 @@ jobs:
2323
if: github.event.pull_request.draft == false
2424
runs-on: ubuntu-22.04
2525
timeout-minutes: 30
26+
env:
27+
PYTHON_VERSION: '3.10'
2628
steps:
2729
- name: Checkout OpenFL repository
2830
uses: actions/checkout@v4
2931
with:
3032
ref: ${{ env.COMMIT_ID }} # use commit_id from the calling workflow
3133

32-
- name: Set up Python
33-
uses: actions/setup-python@v5
34-
with:
35-
python-version: "3.10"
36-
37-
- name: Install Papermill Package
38-
run: python -m pip install --upgrade pip ipython ipykernel papermill
34+
- name: Pre test run
35+
uses: ./.github/actions/wf_pre_test_run
36+
if: ${{ always() }}
3937

4038
- name: Run Notebook
4139
run: |

docs/about/features_index/fed_eval.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@ The plan initialize command supports the optional `--init_model_path` (shortform
108108
-c, --cols_config PATH Path to an authorized collaborator list. [default: plan/cols.yaml]
109109
-d, --data_config PATH The dataset shard configuration file. [default: plan/data.yaml]
110110
-a, --aggregator_address TEXT The FQDN of the federation aggregator
111-
-f, --input_shape TEXT The input spec of the model.
112-
113-
May be provided as a list for single input head: ``--input-shape [3,32,32]``,
114-
115-
or as a dictionary for multihead models (must be passed in quotes):
116-
117-
``--input-shape "{'input_0': [1, 240, 240, 4],'input_1': [1, 240, 240, 1]}"``.
118111
-g, --gandlf_config TEXT GaNDLF Configuration File Path
119112
-r, --install_reqs BOOLEAN If set, installs packages listed under 'requirements.txt'. [default: True]
120113
-i, --init_model_path PATH Path to initial model protobuf file.

0 commit comments

Comments
 (0)