From da40bdbaf2bf49c44ad05192a45e1f797072929c Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Tue, 12 Sep 2023 11:52:36 +0200 Subject: [PATCH 01/16] Add datasets tests as GitHub workflow --- .github/workflows/datasets.yml | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/datasets.yml diff --git a/.github/workflows/datasets.yml b/.github/workflows/datasets.yml new file mode 100644 index 000000000000..45aba4d90734 --- /dev/null +++ b/.github/workflows/datasets.yml @@ -0,0 +1,42 @@ +name: Flower Baselines + +on: + push: + branches: + - main + paths: + - "datasets/flwr_datasets/**" + pull_request: + branches: + - main + paths: + - "datasets/flwr_datasets/**" + +defaults: + run: + working-directory: datasets + +jobs: + test_core: + runs-on: ubuntu-22.04 + strategy: + matrix: + # Latest version which comes cached in the host image can be found here: + # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python + # In case of a mismatch, the job has to download Python to install it. + # Note: Due to a bug in actions/setup-python we have to put 3.10 in + # qoutes as it will otherwise will assume 3.1 + python: [3.8, 3.9, '3.10'] + + name: Python ${{ matrix.python }} + + steps: + - uses: actions/checkout@v3 + - name: Bootstrap + uses: ./../.github/actions/bootstrap + with: + python-version: ${{ matrix.python }} + - name: Install dependencies (mandatory only) + run: python -m poetry install --all-extras + - name: Test (formatting + unit tests) + run: ./dev/test.sh From bb932467c4d9d949a8c314ae1e8a288a2ba6f3cf Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 13 Sep 2023 13:43:42 +0200 Subject: [PATCH 02/16] Update .github/workflows/datasets.yml --- .github/workflows/datasets.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/datasets.yml b/.github/workflows/datasets.yml index 45aba4d90734..160d0fc857c9 100644 --- a/.github/workflows/datasets.yml +++ b/.github/workflows/datasets.yml @@ -12,6 +12,10 @@ on: paths: - "datasets/flwr_datasets/**" +concurrency: + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }} + cancel-in-progress: true + defaults: run: working-directory: datasets From 7f1abb7304da82400a083ec427b78b97e2421ee8 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 13 Sep 2023 13:46:12 +0200 Subject: [PATCH 03/16] Update .github/workflows/datasets.yml --- .github/workflows/datasets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/datasets.yml b/.github/workflows/datasets.yml index 160d0fc857c9..a1fe13e9e7b4 100644 --- a/.github/workflows/datasets.yml +++ b/.github/workflows/datasets.yml @@ -35,7 +35,7 @@ jobs: name: Python ${{ matrix.python }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Bootstrap uses: ./../.github/actions/bootstrap with: From 06130637380d0973781c44216b6fbf234aaa3461 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 13 Sep 2023 13:46:27 +0200 Subject: [PATCH 04/16] Update .github/workflows/datasets.yml --- .github/workflows/datasets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/datasets.yml b/.github/workflows/datasets.yml index a1fe13e9e7b4..d01536cbc95f 100644 --- a/.github/workflows/datasets.yml +++ b/.github/workflows/datasets.yml @@ -37,7 +37,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Bootstrap - uses: ./../.github/actions/bootstrap + uses: ./.github/actions/bootstrap with: python-version: ${{ matrix.python }} - name: Install dependencies (mandatory only) From f0f4f20c9d3924cf4c794c210ad53ef4f48d4921 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 13 Sep 2023 13:47:35 +0200 Subject: [PATCH 05/16] Update .github/workflows/datasets.yml --- .github/workflows/datasets.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/datasets.yml b/.github/workflows/datasets.yml index d01536cbc95f..bb16dc3ab518 100644 --- a/.github/workflows/datasets.yml +++ b/.github/workflows/datasets.yml @@ -4,13 +4,9 @@ on: push: branches: - main - paths: - - "datasets/flwr_datasets/**" pull_request: branches: - main - paths: - - "datasets/flwr_datasets/**" concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }} From 258327a6b7325185ac52cfec8e2fcce00fcdf8fc Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 13 Sep 2023 13:48:21 +0200 Subject: [PATCH 06/16] Update .github/workflows/datasets.yml --- .github/workflows/datasets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/datasets.yml b/.github/workflows/datasets.yml index bb16dc3ab518..b984c663d19f 100644 --- a/.github/workflows/datasets.yml +++ b/.github/workflows/datasets.yml @@ -1,4 +1,4 @@ -name: Flower Baselines +name: Flower Datasets on: push: From bcba8f92880707e97bfa6c62b88c88fd9e7a823f Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Thu, 14 Sep 2023 15:27:48 +0200 Subject: [PATCH 07/16] Make flwr_tool.init_py_check discoverable --- datasets/dev/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 06338dffaea2..0b96f9822b87 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -2,6 +2,10 @@ set -e cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ +# Append parent directory to make flwr_tool.init_py_check discoverable +PARENT_DIR=$(dirname $(pwd)) +export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR}" + echo "=== test.sh ===" echo "- Start Python checks" From ede672d08fc735a53469a079ecbefbb62596f1f7 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Thu, 14 Sep 2023 16:18:38 +0200 Subject: [PATCH 08/16] Make flwr_tool.init_py_check discoverable --- datasets/dev/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 0b96f9822b87..3dc71a71a745 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -4,7 +4,7 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ # Append parent directory to make flwr_tool.init_py_check discoverable PARENT_DIR=$(dirname $(pwd)) -export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR}" +export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR/src/py}" echo "=== test.sh ===" From 8043041f7efcb7dc023e0cae5f276c275dad13fd Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Thu, 14 Sep 2023 16:35:59 +0200 Subject: [PATCH 09/16] Check the pwd, path, pythonpath --- datasets/dev/test.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 3dc71a71a745..eaf3500542e7 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -3,8 +3,14 @@ set -e cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ # Append parent directory to make flwr_tool.init_py_check discoverable -PARENT_DIR=$(dirname $(pwd)) -export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR/src/py}" +#PARENT_DIR=$(dirname $(pwd)) +current_dir=$(pwd) +echo "Current directory is: $current_dir" +#export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR/src/py}" +echo "PATH" +echo ${PATH} +echo "PYTHONPATH" +echo ${PYTHONPATH} echo "=== test.sh ===" From 5d9d912bc493efefa5be9b502a56f9473444aaf6 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Thu, 14 Sep 2023 16:54:13 +0200 Subject: [PATCH 10/16] Make flwr_tool.init_py_check discoverable --- datasets/dev/test.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index eaf3500542e7..7f5115e6dbe7 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -3,14 +3,8 @@ set -e cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ # Append parent directory to make flwr_tool.init_py_check discoverable -#PARENT_DIR=$(dirname $(pwd)) -current_dir=$(pwd) -echo "Current directory is: $current_dir" -#export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR/src/py}" -echo "PATH" -echo ${PATH} -echo "PYTHONPATH" -echo ${PYTHONPATH} +PARENT_DIR=$(dirname $(pwd)) +export PATH="${PATH}:${PARENT_DIR}" echo "=== test.sh ===" From 205ba93876dcced044a24890c0970f45e8c2a669 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Thu, 14 Sep 2023 16:58:32 +0200 Subject: [PATCH 11/16] Make flwr_tool.init_py_check discoverable --- datasets/dev/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 7f5115e6dbe7..2cd6315e65f6 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -4,7 +4,7 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ # Append parent directory to make flwr_tool.init_py_check discoverable PARENT_DIR=$(dirname $(pwd)) -export PATH="${PATH}:${PARENT_DIR}" +export PATH="${PATH}:${PARENT_DIR/src/py}" echo "=== test.sh ===" From ee5e456d850eea362b0b611c4393ab530eda9fd1 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Fri, 15 Sep 2023 12:35:08 +0200 Subject: [PATCH 12/16] Print out paths --- datasets/dev/test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 2cd6315e65f6..115faa5d310b 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -4,8 +4,11 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ # Append parent directory to make flwr_tool.init_py_check discoverable PARENT_DIR=$(dirname $(pwd)) -export PATH="${PATH}:${PARENT_DIR/src/py}" - +echo $PARENT_DIR +export PATH="${PATH}:${PARENT_DIR}:${PARENT_DIR/src/py}" +echo $PATH +export PYTHONPATH="${PATH}:${PARENT_DIR/src/py}:${PARENT_DIR}:${PARENT_DIR/src/py}" +export $PYTHONPATH echo "=== test.sh ===" echo "- Start Python checks" From df9dff8f1f230a866f4c227f02214dc726637fba Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Fri, 15 Sep 2023 13:55:41 +0200 Subject: [PATCH 13/16] Print out paths --- datasets/dev/test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 115faa5d310b..45df8b63e8e4 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -5,10 +5,10 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ # Append parent directory to make flwr_tool.init_py_check discoverable PARENT_DIR=$(dirname $(pwd)) echo $PARENT_DIR -export PATH="${PATH}:${PARENT_DIR}:${PARENT_DIR/src/py}" +export PATH="${PATH}:${PARENT_DIR}:${PARENT_DIR}/src/py" echo $PATH -export PYTHONPATH="${PATH}:${PARENT_DIR/src/py}:${PARENT_DIR}:${PARENT_DIR/src/py}" -export $PYTHONPATH +export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR}/src/py" +echo $PYTHONPATH echo "=== test.sh ===" echo "- Start Python checks" From a668ea1d9445fc4c0b3da7be40f470cc57a183dd Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Fri, 15 Sep 2023 14:01:35 +0200 Subject: [PATCH 14/16] Remove path export --- datasets/dev/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 45df8b63e8e4..65e86a0ef141 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -5,8 +5,8 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ # Append parent directory to make flwr_tool.init_py_check discoverable PARENT_DIR=$(dirname $(pwd)) echo $PARENT_DIR -export PATH="${PATH}:${PARENT_DIR}:${PARENT_DIR}/src/py" -echo $PATH +#export PATH="${PATH}:${PARENT_DIR}/src/py" +#echo $PATH export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR}/src/py" echo $PYTHONPATH echo "=== test.sh ===" From e11bf895e3c2eaa757a3a19f475be6ada32cb547 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Fri, 15 Sep 2023 14:07:49 +0200 Subject: [PATCH 15/16] Clear up test.sh --- datasets/dev/test.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/datasets/dev/test.sh b/datasets/dev/test.sh index 65e86a0ef141..babb5a3cdd36 100755 --- a/datasets/dev/test.sh +++ b/datasets/dev/test.sh @@ -2,13 +2,10 @@ set -e cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ -# Append parent directory to make flwr_tool.init_py_check discoverable -PARENT_DIR=$(dirname $(pwd)) -echo $PARENT_DIR -#export PATH="${PATH}:${PARENT_DIR}/src/py" -#echo $PATH +# Append path to PYTHONPATH that makes flwr_tool.init_py_check discoverable +PARENT_DIR=$(dirname "$(pwd)") # Go one dir up from flower/datasets export PYTHONPATH="${PYTHONPATH}:${PARENT_DIR}/src/py" -echo $PYTHONPATH + echo "=== test.sh ===" echo "- Start Python checks" From 7a09cc3536ec97884c3ba6fdff991dda4016aa70 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 20 Sep 2023 11:30:40 +0200 Subject: [PATCH 16/16] Update .github/workflows/datasets.yml --- .github/workflows/datasets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/datasets.yml b/.github/workflows/datasets.yml index b984c663d19f..60eb9e49db45 100644 --- a/.github/workflows/datasets.yml +++ b/.github/workflows/datasets.yml @@ -1,4 +1,4 @@ -name: Flower Datasets +name: Datasets on: push: