Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
Task_1/venv/*
Task_1/my_code
Task_1/ucb_r*
Task_1/fets_challenge/__pycache__/*
*pycache*
Task_1/cert*
8 changes: 8 additions & 0 deletions Task_1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FeTS_Challenge-flair.py
FeTS_Challenge_FedPOD_partitioning2.py
FeTS_Challenge_RL.py
FeTS_Challenge_RecEng.py
FeTS_Challenge_leonardklausman.py
*final_submission*
build*
cert*
19 changes: 13 additions & 6 deletions Task_1/FeTS_Challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import os
import numpy as np

from pathlib import Path
from fets_challenge import run_challenge_experiment


Expand Down Expand Up @@ -518,15 +518,23 @@ def FedAvgM_Selection(local_tensors,
# to those you specify immediately above. Changing the below value to False will change
# this fact, excluding the three hausdorff measurements. As hausdorff distance is
# expensive to compute, excluding them will speed up your experiments.
include_validation_with_hausdorff=True
include_validation_with_hausdorff=True # IF SET TO FALSE WHOLE CODE RUNS SEGMENTATION FOR SOME REASON

# We encourage participants to experiment with partitioning_1 and partitioning_2, as well as to create
# other partitionings to test your changes for generalization to multiple partitionings.
#institution_split_csv_filename = 'partitioning_1.csv'
institution_split_csv_filename = 'small_split.csv'
#institution_split_csv_filename = 'partitioning_1.csv'


# Dynamically get working directory or environment variable
data_root = Path.cwd() / 'datasets' / 'MICCAI_FeTS2022_TrainingData'
institution_split_csv_filename = '/home/locolinux2/datasets/MICCAI_FeTS2022_TrainingData/partitioning_2.csv'
institution_split_csv_filename = data_root / 'sanity_partitioning.csv'


# change this to point to the parent directory of the data
brats_training_data_parent_dir = '/raid/datasets/FeTS22/MICCAI_FeTS2022_TrainingData'
data_root = Path.cwd() / 'datasets' / 'MICCAI_FeTS2022_TrainingData'
brats_training_data_parent_dir = Path.cwd() / 'datasets' / 'MICCAI_FeTS2022_Resized'

# increase this if you need a longer history for your algorithms
# decrease this if you need to reduce system RAM consumption
Expand All @@ -537,7 +545,7 @@ def FedAvgM_Selection(local_tensors,

# you'll want to increase this most likely. You can set it as high as you like,
# however, the experiment will exit once the simulated time exceeds one week.
rounds_to_train = 5
rounds_to_train = 20

# (bool) Determines whether checkpoints should be saved during the experiment.
# The checkpoints can grow quite large (5-10GB) so only the latest will be saved when this parameter is enabled
Expand Down Expand Up @@ -579,7 +587,6 @@ def FedAvgM_Selection(local_tensors,


from fets_challenge import model_outputs_to_disc
from pathlib import Path

# infer participant home folder
home = str(Path.home())
Expand Down
14 changes: 7 additions & 7 deletions Task_1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ Please ask any additional questions in our discussion pages on our github site a
2. ```git clone https://github.com/FETS-AI/Challenge.git```
3. ```cd Challenge/Task_1```
4. ```git lfs pull```
5. Create virtual environment (python 3.6-3.8): using Anaconda, a new environment can be created and activated using the following commands:
5. Create virtual environment (python 3.9): using Anaconda, a new environment can be created and activated using the following commands:
```sh
## create venv in specific path
conda create -p ./venv python=3.7 -y
conda create -p ./venv python=3.9 -y
conda activate ./venv
```
6. ```pip install --upgrade pip```
7. Install Pytorch LTS (1.8.2) for your system (use CUDA 11):
```pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111```
*Note all previous versions of pytorch can be found in [these instructions]([https://pytorch.org/get-started/locally/](https://pytorch.org/get-started/previous-versions/))
9. Set the environment variable `SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True` (to avoid sklearn deprecation error)
10. ```pip install .```
7. Install Pytorch (2.3.1) for your system:
```pip install torch==2.3.1 torchvision==0.18.1```
*Note all previous versions of pytorch can be found in [this link](https://pytorch.org/get-started/previous-versions/#v231).
8. Set the environment variable `SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True` (to avoid sklearn deprecation error)
9. ```pip install .```
> * _Note: if you run into ```ERROR: Failed building wheel for SimpleITK```, try running ```pip install SimpleITK --only-binary :all:``` then rerunning ```pip install .```_
10. ```python FeTS_Challenge.py```
> * _Note_: if you run into ```ImportError: /home/locolinux/FETS2024/fets2024env/bin/../lib/libstdc++.so.6: version GLIBCXX_3.4.30' not found (required by /home/locolinux/FETS2024/fets2024env/lib/python3.7/site-packages/SimpleITK/_SimpleITK.so)```, try installing a previous version of SimpleITK (version 2.2.0 works)
Expand Down
2 changes: 1 addition & 1 deletion Task_1/fets_challenge/custom_aggregation_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from openfl.component.aggregation_functions.experimental import PrivilegedAggregationFunction
from openfl.interface.aggregation_functions.experimental import PrivilegedAggregationFunction


# extends the openfl agg func interface to include challenge-relevant information
Expand Down
Loading