Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
tasks = ["swarm_*"]
executor {
# client-side controller for training and logic and aggregation management
path = "controller.SwarmClientController"
path = "nvflare.app_common.ccwf.SwarmClientController"
args {
# train task must be implemented by Executor
learn_task_name = "train"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ workflows = [
{
# server-side controller to manage job life cycle
id = "swarm_controller"
path = "controller.SwarmServerController"
path = "nvflare.app_common.ccwf.SwarmServerController"
args {
# can also set aggregation clients and train clients, see class for all available args
num_rounds = 20
start_task_timeout = 360000
progress_timeout = 360000
end_workflow_timeout = 360000
configure_task_timeout = 360000
max_status_report_interval = 360000
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
tasks = ["swarm_*"]
executor {
# client-side controller for training and logic and aggregation management
path = "controller.SwarmClientController"
path = "nvflare.app_common.ccwf.SwarmClientController"
args {
# train task must be implemented by Executor
learn_task_name = "train"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ workflows = [
{
# server-side controller to manage job life cycle
id = "swarm_controller"
path = "controller.SwarmServerController"
path = "nvflare.app_common.ccwf.SwarmServerController"
args {
# can also set aggregation clients and train clients, see class for all available args
num_rounds = 5
start_task_timeout = 36000
progress_timeout = 36000
end_workflow_timeout = 36000
#end_workflow_timeout = 36000
configure_task_timeout = 36000
max_status_report_interval = 36000
}
Expand Down
14 changes: 12 additions & 2 deletions application/jobs/minimal_training_pytorch_cnn/app/custom/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import os

import nvflare.client.lightning as flare
import nvflare.client as flare_util
import nvflare.client.lightning as flare
import torch

import minimal_training

TRAINING_MODE = os.getenv("TRAINING_MODE")

TRAINING_MODE = "swarm"
if TRAINING_MODE == "swarm":
flare_util.init()
SITE_NAME=flare.get_site_name()
Expand All @@ -34,7 +34,17 @@ def main():
logger.info(f"Site name: {SITE_NAME}")

while flare.is_running():
logger.info('Waiting for input model from server...')
input_model = flare.receive()

if input_model is not None:
logger.info("==== Swarm model received ====")
logger.info(
f"input_model.params.keys() = {list(input_model.params.keys())[:10]} ... total = {len(input_model.params)}")
logger.info(
f"model.state_dict().keys() = {list(model.state_dict().keys())[:10]} ... total = {len(model.state_dict())}")


logger.info(f"Current round: {input_model.current_round}")

minimal_training.validate_and_train(logger, data_module, model, trainer)
Expand Down
97 changes: 97 additions & 0 deletions application/jobs/stamp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# STAMP: A Protocol for Solid Tumor Associative Modeling in Pathology

<img src="docs/STAMP_logo.svg" width="250px" align="right"></img>

![CI](https://github.com/KatherLab/STAMP/actions/workflows/ci.yml/badge.svg)

This repository contains the accompanying code for the steps described in the [Nature Protocols paper][stamp paper]:
"From Whole Slide Image to Biomarker Prediction:
A Protocol for End-to-End Deep Learning in Computational Pathology".

> [!NOTE]
> This repo contains an updated version of the codebase.
> For a version compatible with the instructions in the paper,
> please check out [version 1 of STAMP][stamp v1].

[stamp paper]: https://www.nature.com/articles/s41596-024-01047-2 "From whole-slide image to biomarker prediction: end-to-end weakly supervised deep learning in computational pathology"

[stamp v1]: https://github.com/KatherLab/STAMP/tree/v1

## Installing stamp

We recommend installing STAMP with [uv](https://docs.astral.sh/uv/):

```bash
git clone https://github.com/KatherLab/STAMP.git

cd STAMP/

uv sync --all-extras

source .venv/bin/activate
```

> [!IMPORTANT]
> STAMP additionally requires OpenSlide to be installed, as well as OpenCV dependencies.
>
> For Ubuntu < 23.10:
> ```bash
> apt update && apt install -y openslide-tools libgl1-mesa-glx # libgl1-mesa-glx is needed for OpenCV
> ```
>
> For Ubuntu >= 23.10:
> ```bash
> apt update && apt install -y openslide-tools libgl1 libglx-mesa0 libglib2.0-0 # libgl1, libglx-mesa0, libglib2.0-0 are needed for OpenCV
> ```

If the installation was successful, running `stamp` in your terminal should yield the following output:

```
$ stamp
usage: stamp [-h] [--config CONFIG_FILE_PATH] {init,preprocess,encode_slides,encode_patients,train,crossval,deploy,statistics,config,heatmaps} ...

STAMP: Solid Tumor Associative Modeling in Pathology

positional arguments:
{init,preprocess,encode_slides,encode_patients,train,crossval,deploy,statistics,config,heatmaps}
init Create a new STAMP configuration file at the path specified by --config
preprocess Preprocess whole-slide images into feature vectors
encode_slides Encode patch-level features into slide-level embeddings
encode_patients Encode features into patient-level embeddings
train Train a Vision Transformer model
crossval Train a Vision Transformer model with cross validation for modeling.n_splits folds
deploy Deploy a trained Vision Transformer model
statistics Generate AUROCs and AUPRCs with 95%CI for a trained Vision Transformer model
config Print the loaded configuration
heatmaps Generate heatmaps for a trained model

options:
-h, --help show this help message and exit
--config CONFIG_FILE_PATH, -c CONFIG_FILE_PATH
Path to config file. Default: config.yaml
```

## Running stamp

For a quick introduction how to run stamp,
check out our [getting started guide](getting-started.md).

## Reference

If you find our work useful in your research
or if you use parts of this code
please consider citing our [Nature Protocols publication](https://www.nature.com/articles/s41596-024-01047-2):

```
@Article{ElNahhas2024,
author={El Nahhas, Omar S. M. and van Treeck, Marko and W{\"o}lflein, Georg and Unger, Michaela and Ligero, Marta and Lenz, Tim and Wagner, Sophia J. and Hewitt, Katherine J. and Khader, Firas and Foersch, Sebastian and Truhn, Daniel and Kather, Jakob Nikolas},
title={From whole-slide image to biomarker prediction: end-to-end weakly supervised deep learning in computational pathology},
journal={Nature Protocols},
year={2024},
month={Sep},
day={16},
issn={1750-2799},
doi={10.1038/s41596-024-01047-2},
url={https://doi.org/10.1038/s41596-024-01047-2}
}
```
147 changes: 147 additions & 0 deletions application/jobs/stamp/app/config/config_fed_client.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
format_version = 2
app_script = "main.py"
app_config = ""
executors = [
{
tasks = [
"train"
]
executor {
path = "nvflare.app_opt.pt.client_api_launcher_executor.PTClientAPILauncherExecutor"
args {
launcher_id = "launcher"
pipe_id = "pipe"
last_result_transfer_timeout = 360000
external_pre_init_timeout = 360000
peer_read_timeout = 360000
heartbeat_timeout = 360000
params_exchange_format = "pytorch"
params_transfer_type = "DIFF"
train_with_evaluation = true
}
}
}
{
# All tasks prefixed with swarm_ are routed to SwarmClientController
tasks = ["swarm_*"]
executor {
# client-side controller for training and logic and aggregation management
path = "nvflare.app_common.ccwf.SwarmClientController"
args {
# train task must be implemented by Executor
learn_task_name = "train"
# how long to wait for current learn task before timing out the gathering
#learn_task_timeout = 360000
#learn_task_abort_timeout = 360000
#learn_task_ack_timeout = 360000
#final_result_ack_timeout = 360000

# ids must map to corresponding components
persistor_id = "persistor"
aggregator_id = "aggregator"
shareable_generator_id = "shareable_generator"
min_responses_required = 2
#wait_time_after_min_resps_received = 360000
}
}
}
]
task_data_filters = []
task_result_filters = []
components = [
{
id = "launcher"
path = "nvflare.app_common.launchers.subprocess_launcher.SubprocessLauncher"
args {
script = "python3 custom/{app_script} {app_config} "
launch_once = true
}
}
{
id = "aggregator"
path = "nvflare.app_common.aggregators.intime_accumulate_model_aggregator.InTimeAccumulateWeightedAggregator"
args {
expected_data_kind = "WEIGHT_DIFF"
}
}
{
id = "pipe"
path = "nvflare.fuel.utils.pipe.cell_pipe.CellPipe"
args {
mode = "PASSIVE"
site_name = "{SITE_NAME}"
token = "{JOB_ID}"
root_url = "{ROOT_URL}"
secure_mode = "{SECURE_MODE}"
workspace_dir = "{WORKSPACE}"
}
}
{
id = "persistor"
path = "nvflare.app_opt.pt.file_model_persistor.PTFileModelPersistor"
args {
model {
path = "modeling.lightning_model.LitVisionTransformer"
args {
categories = ['WT', 'MUT']
dim_input = 1536
category_weights =[0.8676, 0.1324]
dim_model = 512
dim_feedforward=512
n_heads=8
n_layers=2
dropout=0.25
use_alibi=False
ground_truth_label='isMSIH'
train_patients=['TCGA-AH-6644', 'TCGA-AA-3664', 'TCGA-AZ-4614', 'TCGA-D5-5537', 'TCGA-G4-6628', 'TCGA-EI-6882', 'TCGA-AF-2689', 'TCGA-F4-6805', 'TCGA-AZ-4681', 'TCGA-AG-3882', 'TCGA-A6-6648', 'TCGA-AA-A017', 'TCGA-G4-6303', 'TCGA-EI-6508', 'TCGA-AF-6136', 'TCGA-A6-6654', 'TCGA-AD-6895', 'TCGA-CM-5860', 'TCGA-A6-4105', 'TCGA-F5-6810', 'TCGA-QG-A5YV', 'TCGA-DC-6155', 'TCGA-F5-6812', 'TCGA-QL-A97D', 'TCGA-AZ-4615', 'TCGA-CK-6751', 'TCGA-AH-6547', 'TCGA-AA-3980', 'TCGA-CL-5918', 'TCGA-DM-A282', 'TCGA-AA-3514', 'TCGA-EI-6509', 'TCGA-AF-3911', 'TCGA-CL-5917', 'TCGA-A6-2686', 'TCGA-AA-3950', 'TCGA-AA-3549', 'TCGA-AA-3973', 'TCGA-D5-6922', 'TCGA-AG-3887', 'TCGA-CA-6717', 'TCGA-CM-6171', 'TCGA-AD-6964', 'TCGA-A6-6142', 'TCGA-AD-6890', 'TCGA-A6-6138', 'TCGA-AD-A5EK', 'TCGA-D5-6929', 'TCGA-G4-6588', 'TCGA-AZ-4616', 'TCGA-AA-3561', 'TCGA-QG-A5Z2', 'TCGA-DM-A1HA', 'TCGA-CL-4957', 'TCGA-CA-5255', 'TCGA-DC-6158', 'TCGA-G4-6295', 'TCGA-AY-A69D', 'TCGA-DM-A1D6', 'TCGA-AG-3896', 'TCGA-A6-6652', 'TCGA-CM-6680', 'TCGA-AA-3821', 'TCGA-D5-5540', 'TCGA-DC-5869', 'TCGA-AG-4008', 'TCGA-CK-4952', 'TCGA-AA-3875', 'TCGA-AA-A02W', 'TCGA-EI-6514', 'TCGA-DM-A288', 'TCGA-AG-3890', 'TCGA-AA-3979', 'TCGA-NH-A5IV', 'TCGA-G4-6297', 'TCGA-D5-6927', 'TCGA-AA-3680', 'TCGA-NH-A8F8', 'TCGA-A6-5662', 'TCGA-A6-2674', 'TCGA-AG-A01N', 'TCGA-DM-A1D8', 'TCGA-AA-3837', 'TCGA-AA-A01I', 'TCGA-DM-A0XF', 'TCGA-F4-6855', 'TCGA-CA-6715', 'TCGA-AA-3975', 'TCGA-AA-3989', 'TCGA-AG-A016', 'TCGA-A6-5666', 'TCGA-CK-6746', 'TCGA-CM-4752', 'TCGA-CM-6676', 'TCGA-D5-6541', 'TCGA-A6-5667', 'TCGA-AF-2691', 'TCGA-AD-A5EJ', 'TCGA-F5-6864', 'TCGA-AG-3726', 'TCGA-A6-6649', 'TCGA-AA-A03J', 'TCGA-AF-2687', 'TCGA-AA-3858', 'TCGA-G4-6321', 'TCGA-G5-6641', 'TCGA-G4-6309', 'TCGA-D5-5538', 'TCGA-DM-A28K', 'TCGA-AG-3878', 'TCGA-AZ-6598', 'TCGA-AA-3688', 'TCGA-AG-A01W', 'TCGA-AA-3517', 'TCGA-D5-6898', 'TCGA-CM-5341', 'TCGA-CM-6167', 'TCGA-D5-6531', 'TCGA-DC-6683', 'TCGA-AF-2690', 'TCGA-CM-6161', 'TCGA-A6-5660', 'TCGA-NH-A8F7', 'TCGA-CM-6163', 'TCGA-AA-3968', 'TCGA-CM-5868', 'TCGA-AA-3976', 'TCGA-A6-A565', 'TCGA-AM-5821', 'TCGA-AD-6965', 'TCGA-AY-A71X', 'TCGA-AZ-4682', 'TCGA-AG-3892', 'TCGA-A6-2675', 'TCGA-F4-6569', 'TCGA-AG-3893', 'TCGA-CM-5862', 'TCGA-AZ-6606', 'TCGA-CM-6678', 'TCGA-D5-6931', 'TCGA-D5-6923', 'TCGA-AG-3575', 'TCGA-AA-A00Z', 'TCGA-D5-6540', 'TCGA-A6-3808', 'TCGA-CM-4743', 'TCGA-DC-4749', 'TCGA-T9-A92H', 'TCGA-A6-3810', 'TCGA-AD-6889', 'TCGA-G4-6320', 'TCGA-AA-3971', 'TCGA-AZ-4308', 'TCGA-D5-7000', 'TCGA-DM-A28A', 'TCGA-AG-A01L', 'TCGA-EI-6512', 'TCGA-A6-5661', 'TCGA-AG-3599', 'TCGA-AG-3902', 'TCGA-AD-6548', 'TCGA-AA-A022', 'TCGA-AG-3580', 'TCGA-A6-A567', 'TCGA-AA-3679', 'TCGA-CA-5256', 'TCGA-F4-6808', 'TCGA-D5-6536', 'TCGA-DM-A1D9', 'TCGA-AG-3885', 'TCGA-DM-A1D0', 'TCGA-CM-6674', 'TCGA-EI-6507', 'TCGA-F4-6459', 'TCGA-A6-6137', 'TCGA-AD-6899', 'TCGA-EI-6885', 'TCGA-WS-AB45', 'TCGA-D5-6930', 'TCGA-AU-6004', 'TCGA-AY-6196', 'TCGA-AA-A010', 'TCGA-AG-A00C', 'TCGA-4T-AA8H', 'TCGA-G4-6302', 'TCGA-AA-3966', 'TCGA-AF-2693', 'TCGA-D5-6926', 'TCGA-DM-A0XD', 'TCGA-AA-3854', 'TCGA-D5-6932', 'TCGA-EI-7004', 'TCGA-AG-3594', 'TCGA-EI-6510', 'TCGA-AA-3715', 'TCGA-AA-A01X', 'TCGA-F4-6570', 'TCGA-EI-6511', 'TCGA-CM-5861', 'TCGA-CA-5254', 'TCGA-G4-6317', 'TCGA-DM-A28M', 'TCGA-EI-6506', 'TCGA-AG-A020', 'TCGA-AG-3583', 'TCGA-G4-6294', 'TCGA-CM-6165', 'TCGA-D5-6535', 'TCGA-D5-5541', 'TCGA-DM-A1DB', 'TCGA-AG-A01J', 'TCGA-AG-4001', 'TCGA-AG-A00Y', 'TCGA-AA-3949', 'TCGA-AA-3842', 'TCGA-CA-6716', 'TCGA-CM-5348', 'TCGA-AA-3696', 'TCGA-AA-3833', 'TCGA-NH-A6GC', 'TCGA-CK-4947', 'TCGA-AA-3846', 'TCGA-A6-2677', 'TCGA-A6-2684', 'TCGA-NH-A6GA', 'TCGA-F5-6811', 'TCGA-A6-4107', 'TCGA-F5-6571', 'TCGA-CK-6747', 'TCGA-AA-3666', 'TCGA-CK-5914', 'TCGA-G4-6627', 'TCGA-DC-6681', 'TCGA-AZ-4315', 'TCGA-DT-5265', 'TCGA-CM-4751', 'TCGA-CM-6168', 'TCGA-AY-5543', 'TCGA-AZ-6607', 'TCGA-AG-3901', 'TCGA-AA-3695', 'TCGA-AD-6963', 'TCGA-CK-5913', 'TCGA-AF-2692', 'TCGA-G4-6307', 'TCGA-AA-A01T', 'TCGA-DY-A1DG', 'TCGA-AA-A01C', 'TCGA-AZ-6603', 'TCGA-AG-3727', 'TCGA-AG-3909', 'TCGA-D5-6539', 'TCGA-AZ-5407', 'TCGA-NH-A6GB', 'TCGA-AA-3851', 'TCGA-AF-5654', 'TCGA-AA-3530', 'TCGA-F5-6813', 'TCGA-AA-3845', 'TCGA-AG-3584', 'TCGA-AM-5820', 'TCGA-AA-3982', 'TCGA-D5-6924', 'TCGA-AA-3984', 'TCGA-5M-AATE', 'TCGA-AG-3894', 'TCGA-AU-3779', 'TCGA-A6-2671', 'TCGA-DC-6682', 'TCGA-A6-6653', 'TCGA-DM-A28E', 'TCGA-AZ-5403', 'TCGA-CK-4948', 'TCGA-AF-6655', 'TCGA-AA-A01P', 'TCGA-AA-A024', 'TCGA-F4-6809', 'TCGA-AA-3548', 'TCGA-QG-A5YW', 'TCGA-AA-3818', 'TCGA-EI-6513', 'TCGA-AY-4071', 'TCGA-D5-6532', 'TCGA-AZ-6600', 'TCGA-CM-6172', 'TCGA-AG-A01Y', 'TCGA-AA-3675', 'TCGA-AD-6888', 'TCGA-AH-6897', 'TCGA-AA-3852', 'TCGA-CM-4747', 'TCGA-AG-A02N', 'TCGA-AA-A02F', 'TCGA-DM-A1D7', 'TCGA-AA-3678', 'TCGA-CM-6677', 'TCGA-AA-A004', 'TCGA-D5-5539', 'TCGA-F5-6861', 'TCGA-AA-3544', 'TCGA-F4-6463', 'TCGA-AG-4015', 'TCGA-AF-3400', 'TCGA-CM-6169', 'TCGA-F4-6461', 'TCGA-AD-6901', 'TCGA-DM-A280', 'TCGA-AA-3819', 'TCGA-DM-A0X9', 'TCGA-G4-6315', 'TCGA-AA-3850', 'TCGA-CA-5797', 'TCGA-AA-3856', 'TCGA-AY-6386', 'TCGA-AG-3598', 'TCGA-CM-5863', 'TCGA-AG-3605', 'TCGA-AZ-6599', 'TCGA-CM-5344', 'TCGA-AA-3693', 'TCGA-G4-6306', 'TCGA-F4-6854', 'TCGA-A6-5656', 'TCGA-DY-A0XA', 'TCGA-A6-2685', 'TCGA-AY-6197', 'TCGA-4N-A93T', 'TCGA-NH-A50U', 'TCGA-A6-2683', 'TCGA-AA-3952', 'TCGA-DC-6160', 'TCGA-A6-3807', 'TCGA-AA-3522', 'TCGA-G4-6304', 'TCGA-AA-3526', 'TCGA-DC-4745', 'TCGA-AA-3877', 'TCGA-CM-6162', 'TCGA-AA-3692', 'TCGA-AA-3524', 'TCGA-AG-3881', 'TCGA-AA-3681', 'TCGA-CK-4951', 'TCGA-AA-3534', 'TCGA-A6-A56B', 'TCGA-DM-A1D4', 'TCGA-5M-AAT5', 'TCGA-AG-4022', 'TCGA-AA-3812', 'TCGA-D5-6529', 'TCGA-AA-3673', 'TCGA-EI-6917', 'TCGA-EI-6884', 'TCGA-AG-A011', 'TCGA-AY-A8YK', 'TCGA-EI-6881', 'TCGA-A6-2678', 'TCGA-AA-3947', 'TCGA-A6-5659', 'TCGA-AA-3994', 'TCGA-D5-6534', 'TCGA-AG-3574', 'TCGA-F5-6465', 'TCGA-CA-6719', 'TCGA-AA-3532', 'TCGA-G4-6322', 'TCGA-AF-A56K', 'TCGA-AA-3864', 'TCGA-AA-3685', 'TCGA-AA-3986']
valid_patients=['TCGA-AG-4021', 'TCGA-AG-A02X', 'TCGA-AA-A02H', 'TCGA-F4-6807', 'TCGA-G4-6311', 'TCGA-AF-A56L', 'TCGA-CM-4748', 'TCGA-AZ-6605', 'TCGA-G4-6299', 'TCGA-AA-3667', 'TCGA-5M-AAT4', 'TCGA-5M-AAT6', 'TCGA-F4-6704', 'TCGA-AH-6544', 'TCGA-3L-AA1B', 'TCGA-CK-4950', 'TCGA-AA-3956', 'TCGA-G4-6323', 'TCGA-AA-3831', 'TCGA-AH-6903', 'TCGA-CA-5796', 'TCGA-AA-3684', 'TCGA-EI-7002', 'TCGA-F4-6460', 'TCGA-AA-3844', 'TCGA-AA-3848', 'TCGA-D5-6928', 'TCGA-A6-5665', 'TCGA-AA-A01S', 'TCGA-DM-A28H', 'TCGA-DC-6157', 'TCGA-DY-A1DD', 'TCGA-AA-3519', 'TCGA-AA-3855', 'TCGA-F4-6806', 'TCGA-AA-3520', 'TCGA-CM-6675', 'TCGA-AG-3898', 'TCGA-CK-6748', 'TCGA-G4-6298', 'TCGA-G4-6626', 'TCGA-QG-A5Z1', 'TCGA-DM-A28G', 'TCGA-A6-2681', 'TCGA-DM-A28F', 'TCGA-G4-6586', 'TCGA-CK-5916', 'TCGA-AG-A002', 'TCGA-AG-A026', 'TCGA-AA-A02E', 'TCGA-F5-6464', 'TCGA-EI-6883', 'TCGA-F4-6856', 'TCGA-AG-A015', 'TCGA-CM-5349', 'TCGA-DM-A1DA', 'TCGA-D5-6530', 'TCGA-A6-A566', 'TCGA-NH-A50V', 'TCGA-F5-6814', 'TCGA-CM-6166', 'TCGA-CI-6622', 'TCGA-AA-3977', 'TCGA-CA-6718', 'TCGA-AA-3841', 'TCGA-AA-3521', 'TCGA-NH-A50T', 'TCGA-AA-A01R', 'TCGA-AG-A008', 'TCGA-CM-4746', 'TCGA-AA-A02R', 'TCGA-DC-6154', 'TCGA-AA-3531', 'TCGA-F5-6863', 'TCGA-F4-6703', 'TCGA-AY-A54L', 'TCGA-AA-3811', 'TCGA-AA-3814', 'TCGA-CK-5912', 'TCGA-A6-3809', 'TCGA-A6-5657', 'TCGA-EF-5830', 'TCGA-CM-6164', 'TCGA-SS-A7HO', 'TCGA-CM-5864', 'TCGA-AF-4110', 'TCGA-AF-6672', 'TCGA-AA-3866', 'TCGA-AA-A01V', 'TCGA-AA-A00N', 'TCGA-D5-6538', 'TCGA-CM-6170', 'TCGA-D5-6537', 'TCGA-AA-A02Y', 'TCGA-DY-A1DC', 'TCGA-AG-3883', 'TCGA-AD-5900', 'TCGA-AA-3955', 'TCGA-AG-3581', 'TCGA-A6-5664', 'TCGA-DY-A1DF', 'TCGA-AA-A02O', 'TCGA-AA-3527', 'TCGA-F5-6702', 'TCGA-AH-6643', 'TCGA-G4-6293', 'TCGA-DC-5337', 'TCGA-AA-A03F', 'TCGA-CI-6624', 'TCGA-AG-3602', 'TCGA-AA-3538', 'TCGA-AA-A01Z', 'TCGA-AA-3558', 'TCGA-AA-3560', 'TCGA-AA-3867', 'TCGA-A6-6650', 'TCGA-CK-5915', 'TCGA-A6-6651', 'TCGA-AY-4070', 'TCGA-AF-A56N', 'TCGA-D5-6533', 'TCGA-AA-3529', 'TCGA-AG-A032', 'TCGA-QG-A5YX']

}
}
}
}
{
id = "shareable_generator"
path = "nvflare.app_common.ccwf.comps.simple_model_shareable_generator.SimpleModelShareableGenerator"
args {}
}
{
id = "metrics_pipe"
path = "nvflare.fuel.utils.pipe.cell_pipe.CellPipe"
args {
mode = "PASSIVE"
site_name = "{SITE_NAME}"
token = "{JOB_ID}"
root_url = "{ROOT_URL}"
secure_mode = "{SECURE_MODE}"
workspace_dir = "{WORKSPACE}"
}
}
{
id = "metric_relay"
path = "nvflare.app_common.widgets.metric_relay.MetricRelay"
args {
pipe_id = "metrics_pipe"
event_type = "fed.analytix_log_stats"
read_interval = 0.1
}
}
{
id = "model_selector"
path = "nvflare.app_common.widgets.intime_model_selector.IntimeModelSelector"
args {
key_metric = "accuracy"
}
}
{
id = "config_preparer"
path = "nvflare.app_common.widgets.external_configurator.ExternalConfigurator"
args {
component_ids = [
"metric_relay"
]
}
}
]
}
26 changes: 26 additions & 0 deletions application/jobs/stamp/app/config/config_fed_server.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
format_version = 2
task_data_filters = []
task_result_filters = []
components = [
{
# write validation results to json file
id = "json_generator"
path = "nvflare.app_common.widgets.validation_json_generator.ValidationJsonGenerator"
args {}
}
]
workflows = [
{
# server-side controller to manage job life cycle
id = "swarm_controller"
path = "nvflare.app_common.ccwf.SwarmServerController"
args {
# can also set aggregation clients and train clients, see class for all available args
num_rounds = 20
#start_task_timeout = 360000
#progress_timeout = 360000
#configure_task_timeout = 360000
#max_status_report_interval = 360000
}
}
]
Empty file.
Loading
Loading