From c70ef8bb98524cf1b9012858a84c33c5b190cb0c Mon Sep 17 00:00:00 2001 From: Sarthak Pati Date: Tue, 16 Jan 2024 16:40:05 -0500 Subject: [PATCH 01/39] added config parsing check --- openfl/federated/task/runner_gandlf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index 7db12dcecf..29911c63b7 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -45,6 +45,13 @@ def __init__( if isinstance(gandlf_config, str) and os.path.exists(gandlf_config): gandlf_config = yaml.safe_load(open(gandlf_config, "r")) + # if we are here, the assumption is that GaNDLF is present in the environment + try: + from GANDLF.parseConfig import parseConfig as gandlf_config_parser + gandlf_config = gandlf_config_parser(gandlf_config) + except Exception: + self.logger.info("WARNING: GaNDLF doesn't seem to have been correctly installed") + ( model, optimizer, From 9a94403607392623161d27f3482e00f09db61627 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 21:20:02 -0500 Subject: [PATCH 02/39] updated usage --- openfl/federated/task/runner_gandlf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index 29911c63b7..02538acbcf 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -19,6 +19,7 @@ from GANDLF.compute.generic import create_pytorch_objects from GANDLF.compute.training_loop import train_network from GANDLF.compute.forward_pass import validate_network +from GANDLF.parseConfig import parseConfig class GaNDLFTaskRunner(TaskRunner): @@ -47,10 +48,9 @@ def __init__( # if we are here, the assumption is that GaNDLF is present in the environment try: - from GANDLF.parseConfig import parseConfig as gandlf_config_parser - gandlf_config = gandlf_config_parser(gandlf_config) + gandlf_config = parseConfig(gandlf_config) except Exception: - self.logger.info("WARNING: GaNDLF doesn't seem to have been correctly installed") + self.logger.info("WARNING: GaNDLF.parseConfig did not work as expected.") ( model, From e70836fea330636032334ad47831a52c8c8b2dae Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 21:25:21 -0500 Subject: [PATCH 03/39] using latest gandlf tag, and updated plan initialization command --- .github/workflows/fets-challenge.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index ff57453efc..43f431658e 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -27,23 +27,27 @@ jobs: pip install torch==2.1.0+cpu torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu pip install . - name: Setup FeTS Challenge Prerequisites - uses: actions/checkout@master - with: - repository: MLCommons/GaNDLF - ref: master - fetch-depth: 1 - path: fets_challenge + run: + echo "Installing GaNDLF" + git clone https://github.com/MLCommons/GaNDLF.git ./gandlf + cd gandlf + git fetch --tags + echo "Checkout the latest GaNDLF tag" + latestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") + git checkout $latestTag - name: FeTS Challenge Task Runner Test run: | - cd fets_challenge + cd gandlf pwd pip install -e . pip uninstall onnx -y - # Download data and Split CSVs into training and validation + echo "Download data and Split CSVs into training and validation" python -c "from testing.test_full import test_generic_download_data, test_generic_constructTrainingCSV; test_generic_download_data(); test_generic_constructTrainingCSV()" head -n 1 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/valid.csv tail -n +9 testing/data/train_3d_rad_segmentation.csv >> /home/runner/work/openfl/openfl/valid.csv head -n 8 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/train.csv + echo "Initialize OpenFL plan" + fx plan initialize --gandlf_config testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 From 4249d22cd966f0385e6de1437706333689fc7161 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 21:27:21 -0500 Subject: [PATCH 04/39] updated message --- .github/workflows/fets-challenge.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 43f431658e..d3b119ce62 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -26,9 +26,8 @@ jobs: python -m pip install --upgrade pip pip install torch==2.1.0+cpu torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu pip install . - - name: Setup FeTS Challenge Prerequisites - run: - echo "Installing GaNDLF" + - name: Install GaNDLF + run: | git clone https://github.com/MLCommons/GaNDLF.git ./gandlf cd gandlf git fetch --tags From 89d0450e6e16e32f606e0ca47516f40f3a6324a9 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 21:27:41 -0500 Subject: [PATCH 05/39] renamed --- .github/workflows/fets-challenge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index d3b119ce62..9c37a1de78 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: FeTS Challenge TaskRunner +name: GaNDLF TaskRunner on: pull_request: @@ -34,7 +34,7 @@ jobs: echo "Checkout the latest GaNDLF tag" latestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") git checkout $latestTag - - name: FeTS Challenge Task Runner Test + - name: GaNDLF Task Runner Test run: | cd gandlf pwd From daba8c3c12445c4467be0d95e080686472221540 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 22:42:11 -0500 Subject: [PATCH 06/39] minor rename --- openfl/federated/task/runner_gandlf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index 02538acbcf..f22baa891a 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -50,7 +50,7 @@ def __init__( try: gandlf_config = parseConfig(gandlf_config) except Exception: - self.logger.info("WARNING: GaNDLF.parseConfig did not work as expected.") + self.logger.info("WARNING: GANDLF.parseConfig did not work as expected.") ( model, From 600f3140f68c22361b1acc2b65b53caaa3a8b7b4 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 22:42:46 -0500 Subject: [PATCH 07/39] no need for this comment --- openfl/federated/task/runner_gandlf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index f22baa891a..d81ecb690c 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -46,7 +46,6 @@ def __init__( if isinstance(gandlf_config, str) and os.path.exists(gandlf_config): gandlf_config = yaml.safe_load(open(gandlf_config, "r")) - # if we are here, the assumption is that GaNDLF is present in the environment try: gandlf_config = parseConfig(gandlf_config) except Exception: From a3c1d6877cd110ca8f89a23b7ecf383074ae47ee Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 23:21:51 -0500 Subject: [PATCH 08/39] let's see if this works --- .github/workflows/fets-challenge.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 9c37a1de78..29777a4532 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -46,6 +46,12 @@ jobs: tail -n +9 testing/data/train_3d_rad_segmentation.csv >> /home/runner/work/openfl/openfl/valid.csv head -n 8 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/train.csv echo "Initialize OpenFL plan" + ## from docs + export WORKSPACE_TEMPLATE=gandlf_seg_test + export WORKSPACE_PATH=./my_federation + fx workspace create --prefix ${WORKSPACE_PATH} --template ${WORKSPACE_TEMPLATE} + cd ${WORKSPACE_PATH} + ## from docs fx plan initialize --gandlf_config testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls From 9f4ba4e31c5413100556e410b833fdfe5a3457ec Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 16 Jan 2024 23:21:56 -0500 Subject: [PATCH 09/39] updated ignore --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0164367eb1..8c0419b1a9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,6 @@ venv/* *.jpg *.crt *.key -.eggs \ No newline at end of file +.eggs +eggs/* +*.pyi From 3931c22cb61352936c458b07d859996465f5bc4e Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Wed, 17 Jan 2024 06:55:45 -0500 Subject: [PATCH 10/39] trying to set the paths --- .github/workflows/fets-challenge.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 29777a4532..f7e19f39ee 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -51,9 +51,14 @@ jobs: export WORKSPACE_PATH=./my_federation fx workspace create --prefix ${WORKSPACE_PATH} --template ${WORKSPACE_TEMPLATE} cd ${WORKSPACE_PATH} + mkdir one + mkdir two + cp /home/runner/work/openfl/openfl/*.csv ./data/one/ + cp /home/runner/work/openfl/openfl/*.csv ./data/two/ ## from docs fx plan initialize --gandlf_config testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl + mkdir data ls python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 From bbddefc36305f0bacb426ee65fe7b700bfe6c1df Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Wed, 17 Jan 2024 07:01:21 -0500 Subject: [PATCH 11/39] fixed paths --- .github/workflows/fets-challenge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index f7e19f39ee..b6aea52ab6 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -51,8 +51,8 @@ jobs: export WORKSPACE_PATH=./my_federation fx workspace create --prefix ${WORKSPACE_PATH} --template ${WORKSPACE_TEMPLATE} cd ${WORKSPACE_PATH} - mkdir one - mkdir two + mkdir ./data/one + mkdir ./data/two cp /home/runner/work/openfl/openfl/*.csv ./data/one/ cp /home/runner/work/openfl/openfl/*.csv ./data/two/ ## from docs From f15e7dc2da8f61efcddc816e79248a40f726b359 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Wed, 17 Jan 2024 09:11:29 -0500 Subject: [PATCH 12/39] added debug --- openfl/federated/task/runner_gandlf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index d81ecb690c..0948df4304 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -47,6 +47,8 @@ def __init__( gandlf_config = yaml.safe_load(open(gandlf_config, "r")) try: + self.logger.info("Trying GANDLF.parseConfig.") + self.logger.info(gandlf_config) gandlf_config = parseConfig(gandlf_config) except Exception: self.logger.info("WARNING: GANDLF.parseConfig did not work as expected.") From 0454e8cd244d1251c63120e669d48045bcc54ad7 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Wed, 17 Jan 2024 09:18:22 -0500 Subject: [PATCH 13/39] added an assert --- openfl/federated/task/runner_gandlf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index 0948df4304..46c1b39a80 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -38,6 +38,8 @@ def __init__( """ super().__init__(**kwargs) + assert gandlf_config is not None, "gandlf_config must be specified" + # allow pass-through of a gandlf config as a file or a dict train_csv = self.data_loader.train_csv @@ -47,8 +49,6 @@ def __init__( gandlf_config = yaml.safe_load(open(gandlf_config, "r")) try: - self.logger.info("Trying GANDLF.parseConfig.") - self.logger.info(gandlf_config) gandlf_config = parseConfig(gandlf_config) except Exception: self.logger.info("WARNING: GANDLF.parseConfig did not work as expected.") From 149f8cce530dfc397fe369e65c7e1b35751acb86 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Wed, 17 Jan 2024 09:30:36 -0500 Subject: [PATCH 14/39] better check for empty dict --- openfl/federated/task/runner_gandlf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index 46c1b39a80..19da03f55c 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -38,7 +38,7 @@ def __init__( """ super().__init__(**kwargs) - assert gandlf_config is not None, "gandlf_config must be specified" + assert bool(gandlf_config), "gandlf_config must be specified" # allow pass-through of a gandlf config as a file or a dict From d1d8477a187892a86b78f2de18e44ff9f4fd0c9a Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Wed, 17 Jan 2024 09:30:47 -0500 Subject: [PATCH 15/39] no need for this `mkdir` command --- .github/workflows/fets-challenge.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index b6aea52ab6..59116ea40c 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -58,7 +58,6 @@ jobs: ## from docs fx plan initialize --gandlf_config testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl - mkdir data ls python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 From ba7526f39b395dd7f217a5c7d651cc3b92b966cd Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Thu, 18 Jan 2024 13:08:56 -0500 Subject: [PATCH 16/39] this is not really needed in the workflow --- .github/workflows/fets-challenge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 59116ea40c..77492ebab8 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -56,8 +56,8 @@ jobs: cp /home/runner/work/openfl/openfl/*.csv ./data/one/ cp /home/runner/work/openfl/openfl/*.csv ./data/two/ ## from docs - fx plan initialize --gandlf_config testing/config_segmentation.yaml + # fx plan initialize --gandlf_config ../testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls - python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 + python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config ../testing/config_segmentation.yaml From 76ccd07679d40a2c0dc7ae4e191c558564f6a00c Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Thu, 18 Jan 2024 13:09:09 -0500 Subject: [PATCH 17/39] added the plan initialization in the test --- tests/github/test_gandlf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/github/test_gandlf.py b/tests/github/test_gandlf.py index 117bcef3d6..92dec10013 100644 --- a/tests/github/test_gandlf.py +++ b/tests/github/test_gandlf.py @@ -28,6 +28,7 @@ def exec(command, directory): parser.add_argument('--rounds-to-train') parser.add_argument('--col1-data-path', default='data/one') parser.add_argument('--col2-data-path', default='data/two') + parser.add_argument('--gandlf_config', action='store_true') parser.add_argument('--ujjwal', action='store_true') origin_dir = Path().resolve() @@ -49,7 +50,7 @@ def exec(command, directory): if re.match(r'.*\.csv$', entry.name): shutil.copy(entry.path, Path.cwd().resolve() / 'data' / col1) # Initialize FL plan - check_call(['fx', 'plan', 'initialize', '-a', fqdn]) + check_call(['fx', 'plan', 'initialize', '-a', fqdn, '--gandlf_config', str(args.gandlf_config)]) plan_path = Path('plan/plan.yaml') try: rounds_to_train = int(rounds_to_train) From a3e764ad9fe571677a0494ef2650dae6deef75ae Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Thu, 18 Jan 2024 13:10:06 -0500 Subject: [PATCH 18/39] Add default value for --gandlf_config argument --- tests/github/test_gandlf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/github/test_gandlf.py b/tests/github/test_gandlf.py index 92dec10013..613c46de8a 100644 --- a/tests/github/test_gandlf.py +++ b/tests/github/test_gandlf.py @@ -28,7 +28,7 @@ def exec(command, directory): parser.add_argument('--rounds-to-train') parser.add_argument('--col1-data-path', default='data/one') parser.add_argument('--col2-data-path', default='data/two') - parser.add_argument('--gandlf_config', action='store_true') + parser.add_argument('--gandlf_config', action='store_true', default=None) parser.add_argument('--ujjwal', action='store_true') origin_dir = Path().resolve() @@ -50,7 +50,10 @@ def exec(command, directory): if re.match(r'.*\.csv$', entry.name): shutil.copy(entry.path, Path.cwd().resolve() / 'data' / col1) # Initialize FL plan - check_call(['fx', 'plan', 'initialize', '-a', fqdn, '--gandlf_config', str(args.gandlf_config)]) + if args.gandlf_config: + check_call(['fx', 'plan', 'initialize', '-a', fqdn, '--gandlf_config', str(args.gandlf_config)]) + else: + check_call(['fx', 'plan', 'initialize', '-a', fqdn]) plan_path = Path('plan/plan.yaml') try: rounds_to_train = int(rounds_to_train) From d7b970f186b5bfefff4dc8252545e316c516703e Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Thu, 18 Jan 2024 13:21:04 -0500 Subject: [PATCH 19/39] checking if this worked --- tests/github/test_gandlf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/github/test_gandlf.py b/tests/github/test_gandlf.py index 613c46de8a..98ddcf22c7 100644 --- a/tests/github/test_gandlf.py +++ b/tests/github/test_gandlf.py @@ -28,7 +28,7 @@ def exec(command, directory): parser.add_argument('--rounds-to-train') parser.add_argument('--col1-data-path', default='data/one') parser.add_argument('--col2-data-path', default='data/two') - parser.add_argument('--gandlf_config', action='store_true', default=None) + parser.add_argument('--gandlf_config', default=None) parser.add_argument('--ujjwal', action='store_true') origin_dir = Path().resolve() From 23685afdd0bba1d0232cfe0450ff8181ab4f85e7 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Mon, 22 Jan 2024 21:32:35 -0500 Subject: [PATCH 20/39] trying using `pwd` --- .github/workflows/fets-challenge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 77492ebab8..097b72fc34 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -59,5 +59,5 @@ jobs: # fx plan initialize --gandlf_config ../testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls - python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config ../testing/config_segmentation.yaml + python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "$(pwd)/../testing/config_segmentation.yaml" From 24c41644a1dcf9b7fba6f6395e7058573fadf80a Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Mon, 22 Jan 2024 21:36:07 -0500 Subject: [PATCH 21/39] should fix lint --- tests/github/test_gandlf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/github/test_gandlf.py b/tests/github/test_gandlf.py index 98ddcf22c7..d59f6a8ffa 100644 --- a/tests/github/test_gandlf.py +++ b/tests/github/test_gandlf.py @@ -51,7 +51,8 @@ def exec(command, directory): shutil.copy(entry.path, Path.cwd().resolve() / 'data' / col1) # Initialize FL plan if args.gandlf_config: - check_call(['fx', 'plan', 'initialize', '-a', fqdn, '--gandlf_config', str(args.gandlf_config)]) + check_call(['fx', 'plan', 'initialize', '-a', fqdn, + '--gandlf_config', str(args.gandlf_config)]) else: check_call(['fx', 'plan', 'initialize', '-a', fqdn]) plan_path = Path('plan/plan.yaml') From b35c58e048ab8d60d455241cfa76547716e15775 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 23 Jan 2024 09:31:50 -0500 Subject: [PATCH 22/39] check file presence --- .github/workflows/fets-challenge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 097b72fc34..f01412ea2e 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -59,5 +59,6 @@ jobs: # fx plan initialize --gandlf_config ../testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls + file "$(pwd)/../testing/config_segmentation.yaml" python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "$(pwd)/../testing/config_segmentation.yaml" From 72f6c89f06cfdb40296582c00f8131ab8556ea13 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 23 Jan 2024 09:45:08 -0500 Subject: [PATCH 23/39] removed trailing whitespace --- tests/github/test_gandlf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/github/test_gandlf.py b/tests/github/test_gandlf.py index d59f6a8ffa..b1c68a94c4 100644 --- a/tests/github/test_gandlf.py +++ b/tests/github/test_gandlf.py @@ -51,7 +51,7 @@ def exec(command, directory): shutil.copy(entry.path, Path.cwd().resolve() / 'data' / col1) # Initialize FL plan if args.gandlf_config: - check_call(['fx', 'plan', 'initialize', '-a', fqdn, + check_call(['fx', 'plan', 'initialize', '-a', fqdn, '--gandlf_config', str(args.gandlf_config)]) else: check_call(['fx', 'plan', 'initialize', '-a', fqdn]) From 2c3fe982f1192105bf5aeec1a6662dcf41422bbf Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 23 Jan 2024 09:47:56 -0500 Subject: [PATCH 24/39] checking another path --- .github/workflows/fets-challenge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index f01412ea2e..c366e20ddb 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -59,6 +59,6 @@ jobs: # fx plan initialize --gandlf_config ../testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls - file "$(pwd)/../testing/config_segmentation.yaml" - python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "$(pwd)/../testing/config_segmentation.yaml" + file "${WORKSPACE_PATH}/gandlf/testing/config_segmentation.yaml" + python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "${WORKSPACE_PATH}/gandlf/testing/config_segmentation.yaml" From 2c81661ac904283ce763eaf84218c2e1b7dafe29 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 23 Jan 2024 10:11:06 -0500 Subject: [PATCH 25/39] checking copy to a known location --- .github/workflows/fets-challenge.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index c366e20ddb..d23e716c19 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -45,6 +45,7 @@ jobs: head -n 1 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/valid.csv tail -n +9 testing/data/train_3d_rad_segmentation.csv >> /home/runner/work/openfl/openfl/valid.csv head -n 8 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/train.csv + cp testing/config_segmentation.yaml ${WORKSPACE_PATH}/config_segmentation.yaml echo "Initialize OpenFL plan" ## from docs export WORKSPACE_TEMPLATE=gandlf_seg_test @@ -59,6 +60,6 @@ jobs: # fx plan initialize --gandlf_config ../testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls - file "${WORKSPACE_PATH}/gandlf/testing/config_segmentation.yaml" - python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "${WORKSPACE_PATH}/gandlf/testing/config_segmentation.yaml" + file "${WORKSPACE_PATH}/config_segmentation.yaml" + python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "${WORKSPACE_PATH}/config_segmentation.yaml" From 84e73a1f703e30da31c6e649f6b0711bb8900613 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 23 Jan 2024 10:16:14 -0500 Subject: [PATCH 26/39] different path --- .github/workflows/fets-challenge.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index d23e716c19..3a80eefbb2 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -45,7 +45,7 @@ jobs: head -n 1 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/valid.csv tail -n +9 testing/data/train_3d_rad_segmentation.csv >> /home/runner/work/openfl/openfl/valid.csv head -n 8 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/train.csv - cp testing/config_segmentation.yaml ${WORKSPACE_PATH}/config_segmentation.yaml + cp testing/config_segmentation.yaml /home/runner/work/openfl/openfl/config_segmentation.yaml echo "Initialize OpenFL plan" ## from docs export WORKSPACE_TEMPLATE=gandlf_seg_test @@ -60,6 +60,6 @@ jobs: # fx plan initialize --gandlf_config ../testing/config_segmentation.yaml cd /home/runner/work/openfl/openfl ls - file "${WORKSPACE_PATH}/config_segmentation.yaml" - python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "${WORKSPACE_PATH}/config_segmentation.yaml" + file "/home/runner/work/openfl/openfl/config_segmentation.yaml" + python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "/home/runner/work/openfl/openfl/config_segmentation.yaml" From 9f717adaa4ba23620f31f6309bdeb116218c55f7 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Tue, 23 Jan 2024 21:40:42 -0500 Subject: [PATCH 27/39] trying something else --- .github/workflows/fets-challenge.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 3a80eefbb2..ac7f7efb71 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -40,12 +40,15 @@ jobs: pwd pip install -e . pip uninstall onnx -y + cat ./GANDLF/version.py echo "Download data and Split CSVs into training and validation" python -c "from testing.test_full import test_generic_download_data, test_generic_constructTrainingCSV; test_generic_download_data(); test_generic_constructTrainingCSV()" head -n 1 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/valid.csv tail -n +9 testing/data/train_3d_rad_segmentation.csv >> /home/runner/work/openfl/openfl/valid.csv head -n 8 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/train.csv cp testing/config_segmentation.yaml /home/runner/work/openfl/openfl/config_segmentation.yaml + echo "DEBUG display the config file" + cat /home/runner/work/openfl/openfl/config_segmentation.yaml echo "Initialize OpenFL plan" ## from docs export WORKSPACE_TEMPLATE=gandlf_seg_test From 77907960911783dcba59a18ea5bb2dec4578b480 Mon Sep 17 00:00:00 2001 From: Patrick Foley Date: Wed, 31 Jan 2024 19:55:02 -0800 Subject: [PATCH 28/39] Fix plan initialization --- openfl/interface/plan.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/openfl/interface/plan.py b/openfl/interface/plan.py index 18e5b0216a..7e308a71e7 100644 --- a/openfl/interface/plan.py +++ b/openfl/interface/plan.py @@ -105,18 +105,14 @@ def initialize(context, plan_config, cols_config, data_config, utils.dump_proto(model_proto=model_snap, fpath=init_state_path) - plan_origin = Plan.parse(plan_config, resolve=False).config - - if (plan_origin['network']['settings']['agg_addr'] == 'auto' + if (plan.config['network']['settings']['agg_addr'] == 'auto' or aggregator_address): - plan_origin['network']['settings']['agg_addr'] = aggregator_address or getfqdn_env() + plan.config['network']['settings']['agg_addr'] = aggregator_address or getfqdn_env() logger.warn(f'Patching Aggregator Addr in Plan' - f" 🠆 {plan_origin['network']['settings']['agg_addr']}") - - Plan.dump(plan_config, plan_origin) + f" 🠆 {plan.config['network']['settings']['agg_addr']}") - plan.config = plan_origin + Plan.dump(plan_config, plan.config) # Record that plan with this hash has been initialized if 'plans' not in context.obj: From 973558847765f2de2d0c231e8157da3131c66da8 Mon Sep 17 00:00:00 2001 From: Patrick Foley Date: Thu, 1 Feb 2024 14:49:36 -0800 Subject: [PATCH 29/39] Fix plan initialization for GaNDLF Signed-off-by: Patrick Foley --- openfl/interface/plan.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/openfl/interface/plan.py b/openfl/interface/plan.py index 7e308a71e7..667fd1abc2 100644 --- a/openfl/interface/plan.py +++ b/openfl/interface/plan.py @@ -63,6 +63,8 @@ def initialize(context, plan_config, cols_config, data_config, plan_config = Path(plan_config).absolute() cols_config = Path(cols_config).absolute() data_config = Path(data_config).absolute() + if gandlf_config is not None: + gandlf_config = Path(gandlf_config).absolute() plan = Plan.parse(plan_config_path=plan_config, cols_config_path=cols_config, @@ -79,7 +81,6 @@ def initialize(context, plan_config, cols_config, data_config, # exit('You must specify either a feature # shape or authorized collaborator # list in order for the script to determine the input layer shape') - print(plan.cols_data_paths) collaborator_cname = list(plan.cols_data_paths)[0] @@ -105,19 +106,26 @@ def initialize(context, plan_config, cols_config, data_config, utils.dump_proto(model_proto=model_snap, fpath=init_state_path) - if (plan.config['network']['settings']['agg_addr'] == 'auto' + plan_origin = Plan.parse(plan_config_path=plan_config, + gandlf_config_path=gandlf_config, + resolve=False) + + if (plan_origin.config['network']['settings']['agg_addr'] == 'auto' or aggregator_address): - plan.config['network']['settings']['agg_addr'] = aggregator_address or getfqdn_env() + plan_origin.config['network']['settings']['agg_addr'] = aggregator_address or getfqdn_env() logger.warn(f'Patching Aggregator Addr in Plan' - f" 🠆 {plan.config['network']['settings']['agg_addr']}") + f" 🠆 {plan_origin.config['network']['settings']['agg_addr']}") + + Plan.dump(plan_config, plan_origin.config) - Plan.dump(plan_config, plan.config) + if gandlf_config is not None: + Plan.dump(plan_config, plan_origin.config) # Record that plan with this hash has been initialized if 'plans' not in context.obj: context.obj['plans'] = [] - context.obj['plans'].append(f'{plan_config.stem}_{plan.hash[:8]}') + context.obj['plans'].append(f'{plan_config.stem}_{plan_origin.hash[:8]}') logger.info(f"{context.obj['plans']}") From 70c5a7b45c0f4572b9430b02df5861e2b47047da Mon Sep 17 00:00:00 2001 From: Patrick Foley Date: Thu, 1 Feb 2024 15:11:21 -0800 Subject: [PATCH 30/39] Attempt to add missing param Signed-off-by: Patrick Foley --- openfl/federated/plan/plan.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openfl/federated/plan/plan.py b/openfl/federated/plan/plan.py index 7edbcd679a..0246a530fc 100644 --- a/openfl/federated/plan/plan.py +++ b/openfl/federated/plan/plan.py @@ -132,6 +132,7 @@ def parse(plan_config_path: Path, cols_config_path: Path = None, gandlf_config = Plan.load(Path(gandlf_config_path)) plan.config['task_runner']['settings']['gandlf_config'] = gandlf_config + plan.config['task_runner']['settings']['gandlf_config']['output_dir'] = '.' plan.authorized_cols = Plan.load(cols_config_path).get( 'collaborators', [] From 095c6b7e8c7aeb7376b823142294b359f3d5918c Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 09:15:39 -0500 Subject: [PATCH 31/39] better way to initialize default --- openfl/federated/plan/plan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openfl/federated/plan/plan.py b/openfl/federated/plan/plan.py index 0246a530fc..8c8200b3a4 100644 --- a/openfl/federated/plan/plan.py +++ b/openfl/federated/plan/plan.py @@ -131,8 +131,8 @@ def parse(plan_config_path: Path, cols_config_path: Path = None, extra={'markup': True}) gandlf_config = Plan.load(Path(gandlf_config_path)) - plan.config['task_runner']['settings']['gandlf_config'] = gandlf_config - plan.config['task_runner']['settings']['gandlf_config']['output_dir'] = '.' + ## check for defaults + gandlf_config['output_dir'] = gandlf_config.get('output_dir', '.') plan.authorized_cols = Plan.load(cols_config_path).get( 'collaborators', [] From db8955d42ba18788844afcb93231922343107266 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 09:15:54 -0500 Subject: [PATCH 32/39] using the 3d patch instead of the default 2d one --- .github/workflows/fets-challenge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index ac7f7efb71..e95538869d 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -64,5 +64,6 @@ jobs: cd /home/runner/work/openfl/openfl ls file "/home/runner/work/openfl/openfl/config_segmentation.yaml" + sed -i 's/[128,128]/[32,32,32]/g' /home/runner/work/openfl/openfl/config_segmentation.yaml python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "/home/runner/work/openfl/openfl/config_segmentation.yaml" From 3634fe9f20407cfe9c5ef524ea20fe277fa50157 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 09:18:53 -0500 Subject: [PATCH 33/39] lint fix --- openfl/federated/plan/plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfl/federated/plan/plan.py b/openfl/federated/plan/plan.py index 8c8200b3a4..beabf99261 100644 --- a/openfl/federated/plan/plan.py +++ b/openfl/federated/plan/plan.py @@ -131,7 +131,7 @@ def parse(plan_config_path: Path, cols_config_path: Path = None, extra={'markup': True}) gandlf_config = Plan.load(Path(gandlf_config_path)) - ## check for defaults + # check for defaults gandlf_config['output_dir'] = gandlf_config.get('output_dir', '.') plan.authorized_cols = Plan.load(cols_config_path).get( From 6cc1c9b241e5136a84aad841b97f6836045f12e2 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 09:19:18 -0500 Subject: [PATCH 34/39] this should be there --- openfl/federated/plan/plan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openfl/federated/plan/plan.py b/openfl/federated/plan/plan.py index beabf99261..9d1cb699c1 100644 --- a/openfl/federated/plan/plan.py +++ b/openfl/federated/plan/plan.py @@ -131,8 +131,9 @@ def parse(plan_config_path: Path, cols_config_path: Path = None, extra={'markup': True}) gandlf_config = Plan.load(Path(gandlf_config_path)) - # check for defaults + # check for some defaults gandlf_config['output_dir'] = gandlf_config.get('output_dir', '.') + plan.config['task_runner']['settings']['gandlf_config'] = gandlf_config plan.authorized_cols = Plan.load(cols_config_path).get( 'collaborators', [] From 915bf2e7e251b5267c17c9944bd965ea76539beb Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 09:21:52 -0500 Subject: [PATCH 35/39] lint fix --- openfl/interface/plan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openfl/interface/plan.py b/openfl/interface/plan.py index 667fd1abc2..6d207944d8 100644 --- a/openfl/interface/plan.py +++ b/openfl/interface/plan.py @@ -107,8 +107,8 @@ def initialize(context, plan_config, cols_config, data_config, utils.dump_proto(model_proto=model_snap, fpath=init_state_path) plan_origin = Plan.parse(plan_config_path=plan_config, - gandlf_config_path=gandlf_config, - resolve=False) + gandlf_config_path=gandlf_config, + resolve=False) if (plan_origin.config['network']['settings']['agg_addr'] == 'auto' or aggregator_address): From 9155f3296978c15a8e5c287b54b6f7ab93c84e32 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 09:27:23 -0500 Subject: [PATCH 36/39] this should fix it --- .github/workflows/fets-challenge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index e95538869d..f6d18f718d 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -64,6 +64,6 @@ jobs: cd /home/runner/work/openfl/openfl ls file "/home/runner/work/openfl/openfl/config_segmentation.yaml" - sed -i 's/[128,128]/[32,32,32]/g' /home/runner/work/openfl/openfl/config_segmentation.yaml + sed -i 's/128,128/32,32,32/g' /home/runner/work/openfl/openfl/config_segmentation.yaml python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "/home/runner/work/openfl/openfl/config_segmentation.yaml" From 8f2a74b6d8825587fb9dd97a0dce289a437241af Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 09:49:26 -0500 Subject: [PATCH 37/39] using 2d data for unit test instead of 3d --- .github/workflows/fets-challenge.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index f6d18f718d..0ba487a98b 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -43,9 +43,9 @@ jobs: cat ./GANDLF/version.py echo "Download data and Split CSVs into training and validation" python -c "from testing.test_full import test_generic_download_data, test_generic_constructTrainingCSV; test_generic_download_data(); test_generic_constructTrainingCSV()" - head -n 1 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/valid.csv - tail -n +9 testing/data/train_3d_rad_segmentation.csv >> /home/runner/work/openfl/openfl/valid.csv - head -n 8 testing/data/train_3d_rad_segmentation.csv > /home/runner/work/openfl/openfl/train.csv + head -n 1 testing/data/train_2d_rad_segmentation.csv > /home/runner/work/openfl/openfl/valid.csv + tail -n +9 testing/data/train_2d_rad_segmentation.csv >> /home/runner/work/openfl/openfl/valid.csv + head -n 8 testing/data/train_2d_rad_segmentation.csv > /home/runner/work/openfl/openfl/train.csv cp testing/config_segmentation.yaml /home/runner/work/openfl/openfl/config_segmentation.yaml echo "DEBUG display the config file" cat /home/runner/work/openfl/openfl/config_segmentation.yaml @@ -64,6 +64,5 @@ jobs: cd /home/runner/work/openfl/openfl ls file "/home/runner/work/openfl/openfl/config_segmentation.yaml" - sed -i 's/128,128/32,32,32/g' /home/runner/work/openfl/openfl/config_segmentation.yaml python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "/home/runner/work/openfl/openfl/config_segmentation.yaml" From 25c91b22dac3ceb0d23e0bd33f439c0c12fdd471 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 10:18:33 -0500 Subject: [PATCH 38/39] trying something else --- .github/workflows/fets-challenge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index 0ba487a98b..b33fc61a3e 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -64,5 +64,6 @@ jobs: cd /home/runner/work/openfl/openfl ls file "/home/runner/work/openfl/openfl/config_segmentation.yaml" + sed -i 's/# n_channels: 3/num_channels: 3/g' "/home/runner/work/openfl/openfl/config_segmentation.yaml" python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "/home/runner/work/openfl/openfl/config_segmentation.yaml" From 30d48aae641fa5de03ecb59eab7a3d7a4d7f65c4 Mon Sep 17 00:00:00 2001 From: sarthakpati Date: Fri, 2 Feb 2024 10:27:33 -0500 Subject: [PATCH 39/39] added a few comments --- .github/workflows/fets-challenge.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/fets-challenge.yml b/.github/workflows/fets-challenge.yml index b33fc61a3e..4d517057f8 100644 --- a/.github/workflows/fets-challenge.yml +++ b/.github/workflows/fets-challenge.yml @@ -64,6 +64,11 @@ jobs: cd /home/runner/work/openfl/openfl ls file "/home/runner/work/openfl/openfl/config_segmentation.yaml" + ## for 2d data, only a single change is needed in the gandlf config sed -i 's/# n_channels: 3/num_channels: 3/g' "/home/runner/work/openfl/openfl/config_segmentation.yaml" + ## for 3d data, the following changes are needed in the gandlf config -- commented out for now + # sed -i 's/dimension: 2/dimension: 3/g' "/home/runner/work/openfl/openfl/config_segmentation.yaml" + # sed -i 's/0,255/0,1/g' "/home/runner/work/openfl/openfl/config_segmentation.yaml" + # sed -i 's/128,128/32,32,32/g' "/home/runner/work/openfl/openfl/config_segmentation.yaml" python -m tests.github.test_gandlf --template gandlf_seg_test --fed_workspace aggregator --col1 one --col2 two --rounds-to-train 1 --gandlf_config "/home/runner/work/openfl/openfl/config_segmentation.yaml"