Skip to content

Tutorial

Requirements

To run this tutorial, you need a machine with the following requirements:

  • Internet access.
  • Web browser (to connect to codespaces).

Training Setup with MedPerf (Model Owner)

medperf auth login -e modelowner@example.com

Define the data preparation MLCube

  • Prepare the data preparation pipeline logic that will transform the raw clinical data into AI-ready data. This will be an MLCube

Register the MLCube

medperf mlcube submit -n prep \
    -m https://storage.googleapis.com/medperf-storage/rsna2023/mlcube.yaml

Define the training MLCube

  • Prepare the training logic using OpenFL and GaNDLF

Register the Training MLCube

medperf mlcube submit -n testfl \
    -m https://storage.googleapis.com/medperf-storage/rsna2023/mlcube_rsna.yaml \
    -p https://storage.googleapis.com/medperf-storage/rsna2023/plan_final.yaml \
    -a https://storage.googleapis.com/medperf-storage/rsna2023/init_weights_rsna2023.tar.gz

Register the Training Experiment

medperf training submit -n trainexp -d trainexp -p 1 -m 2

The server admin should approve the experiment. Run:

bash admin_training_approval.sh

Aggregator Setup with MedPerf (Aggregator Owner)

medperf auth login -e aggowner@example.com

register aggregator

medperf aggregator submit -n aggreg -a $(hostname --fqdn) -p 50273

Associate the aggregator with the experiment

medperf aggregator associate -a 1 -t 1

Data preparation (Training Data Owner)

medperf auth login -e traincol1@example.com

Process your data using the data prep mlcube

medperf dataset create -p 1 -d datasets/col1 -l datasets/col1 --name col1 --description col1data --location col1location

Register your dataset

find Hash:

medperf dataset ls
medperf dataset submit -d <hash_found>

Request participation in the training experiment

medperf training associate_dataset -t 1 -d 1

Redo the same with collaborator 2

bash shortcut.sh

Accepting Training Participation (Model Owner)

medperf auth login -e modelowner@example.com

Accept participation requests

medperf training approve_association -t 1 -a 1
medperf training approve_association -t 1 -d 1
medperf training approve_association -t 1 -d 2

Lock the experiment

medperf training lock -t 1

Run the Aggregator (Aggregator Owner)

medperf auth login -e aggowner@example.com
medperf aggregator start -a 1 -t 1

(Now move to another terminal)

Run Training (Training Data Owner)

First collaborator:

medperf auth login -e traincol1@example.com
medperf training run -d 1 -t 1

(Now move to another terminal)

Second collaborator:

medperf auth login -e traincol2@example.com
medperf training run -d 2 -t 1