Skip to content

Commit

Permalink
We have now changed the way dataset is created for the example and al…
Browse files Browse the repository at this point in the history
…so update the README file.
  • Loading branch information
root committed Jun 19, 2024
1 parent 79b91dc commit 42de958
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions examples/monai-2D-mednist/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Connecting clients:
export FEDN_PACKAGE_EXTRACT_DIR=package
export FEDN_DATA_PATH=<full_path_to_the_dir>/data/
export FEDN_CLIENT_SETTINGS_PATH=<full_path_to_the_dir>/client_settings.yaml
export export FEDN_DATA_SPLIT_INDEX=0
export FEDN_DATA_SPLIT_INDEX=0
fedn client start -in client.yaml --secure=True --force-ssl
Expand All @@ -105,9 +105,11 @@ For convenience, there is a Docker image hosted on ghrc.io with fedn preinstalle
docker run \
-v $PWD/client.yaml:/app/client.yaml \
-v $PWD/client_settings.yaml:/app/client_settings.yaml \
-v $PWD/data:/app/data \
-e FEDN_PACKAGE_EXTRACT_DIR=package \
-e FEDN_DATA_PATH=./data/ \
-e FEDN_DATA_PATH=/app/data/ \
-e FEDN_CLIENT_SETTINGS_PATH=/app/client_settings.yaml \
-e FEDN_DATA_SPLIT_INDEX=0 \
ghcr.io/scaleoutsystems/fedn/fedn:0.9.0 run client -in client.yaml --force-ssl --secure=True
Expand Down
2 changes: 1 addition & 1 deletion examples/monai-2D-mednist/client/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def train(in_model_path, out_model_path, data_path=None, client_settings_path=No

image_list = clients["client " + str(split_index)]["train"]

train_ds = MedNISTDataset(data_path=data_path, transforms=train_transforms, image_files=image_list)
train_ds = MedNISTDataset(data_path=data_path+'/MedNIST/', transforms=train_transforms, image_files=image_list)
train_loader = DataLoader(train_ds, batch_size=batch_size, shuffle=True, num_workers=num_workers)

# Load parmeters and initialize model
Expand Down
2 changes: 1 addition & 1 deletion examples/monai-2D-mednist/client/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def validate(in_model_path, out_json_path, data_path=None, client_settings_path=

image_list = clients["client " + str(split_index)]["validation"]

val_ds = MedNISTDataset(data_path="data/MedNIST", transforms=val_transforms, image_files=image_list)
val_ds = MedNISTDataset(data_path=data_path+"/MedNIST/", transforms=val_transforms, image_files=image_list)

val_loader = DataLoader(val_ds, batch_size=batch_size, shuffle=True, num_workers=num_workers)

Expand Down

0 comments on commit 42de958

Please sign in to comment.