Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-nodestate
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes authored Nov 7, 2024
2 parents 070aa1f + 9d227e9 commit ebaeaa6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- connection: insecure
authentication: client-auth
name: |
SuperExec /
Exec API /
Python ${{ matrix.python-version }} /
${{ matrix.connection }} /
${{ matrix.authentication }} /
Expand Down
32 changes: 20 additions & 12 deletions e2e/test_exec_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,19 @@ timeout 2m flower-superlink $combined_args --executor-config "$executor_config"
sl_pid=$(pgrep -f "flower-superlink")
sleep 2

timeout 2m flower-supernode ./ $client_arg \
--superlink $server_address $client_auth_1 \
--node-config "partition-id=0 num-partitions=2" --max-retries 0 &
cl1_pid=$!
sleep 2
if [ "$3" = "deployment-engine" ]; then
timeout 2m flower-supernode ./ $client_arg \
--superlink $server_address $client_auth_1 \
--node-config "partition-id=0 num-partitions=2" --max-retries 0 &
cl1_pid=$!
sleep 2

timeout 2m flower-supernode ./ $client_arg \
--superlink $server_address $client_auth_2 \
--node-config "partition-id=1 num-partitions=2" --max-retries 0 &
cl2_pid=$!
sleep 2
timeout 2m flower-supernode ./ $client_arg \
--superlink $server_address $client_auth_2 \
--node-config "partition-id=1 num-partitions=2" --max-retries 0 &
cl2_pid=$!
sleep 2
fi

timeout 1m flwr run --run-config num-server-rounds=1 ../e2e-tmp-test e2e

Expand All @@ -105,7 +107,10 @@ while [ "$found_success" = false ] && [ $elapsed -lt $timeout ]; do
if grep -q "Run finished" flwr_output.log; then
echo "Training worked correctly!"
found_success=true
kill $cl1_pid; kill $cl2_pid; sleep 1; kill $sl_pid;
if $3 = "deployment-engine"; then
kill $cl1_pid; kill $cl2_pid;
fi
sleep 1; kill $sl_pid;
else
echo "Waiting for training ... ($elapsed seconds elapsed)"
fi
Expand All @@ -116,5 +121,8 @@ done

if [ "$found_success" = false ]; then
echo "Training had an issue and timed out."
kill $cl1_pid; kill $cl2_pid; kill $sl_pid;
if $3 = "deployment-engine"; then
kill $cl1_pid; kill $cl2_pid;
fi
kill $sl_pid;
fi

0 comments on commit ebaeaa6

Please sign in to comment.