diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 4ad54fae8fa9..bf5293617284 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -139,11 +139,11 @@ jobs: if: ${{ matrix.dataset }} run: python -c "${{ matrix.dataset }}" - name: Run edge client test - if: ${{ matrix.directory != 'bare-client-auth' }} + if: ${{ matrix.directory != 'bare-client-auth'}} run: ./../test_legacy.sh "${{ matrix.directory }}" - name: Run virtual client test - if: ${{ matrix.directory != 'bare-client-auth' }} - run: python simulation.py + if: ${{ matrix.directory != 'bare-client-auth' && matrix.directory != 'bare-https'}} + run: ./../test_simulation.sh "${{ matrix.directory }}" - name: Run simulation engine test if: ${{ matrix.directory == 'pytorch' || matrix.directory == 'tensorflow'}} run: python simulation_next.py diff --git a/e2e/framework-pandas/client.py b/e2e/framework-pandas/client.py index 0c3300e1dd3f..3e2d4efb6721 100644 --- a/e2e/framework-pandas/client.py +++ b/e2e/framework-pandas/client.py @@ -1,3 +1,4 @@ +from pathlib import Path from typing import Dict, List, Tuple import numpy as np diff --git a/e2e/test_simulation.sh b/e2e/test_simulation.sh new file mode 100755 index 000000000000..1d0ad73470d7 --- /dev/null +++ b/e2e/test_simulation.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -e + +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +framework=$1 + +case "$framework" in + framework-pandas) + server_app="server:app" + client_app="client:app" + app_dir="./" + ;; + *) + server_app="server:app" + client_app="${framework}.client:app" + app_dir="./.." + ;; +esac + +echo flower-simulation --server-app $server_app --client-app $client_app --num-supernodes 2 --app-dir $app_dir + +timeout 2m flower-simulation --server-app $server_app --client-app $client_app --num-supernodes 2 --app-dir $app_dir & +pid=$! + +wait $pid +res=$? + +if [[ "$res" = "0" ]]; + then echo "Training worked correctly"; + else echo "Training had an issue" && exit 1; +fi