Skip to content

Commit

Permalink
swith back
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerroth committed Apr 26, 2024
1 parent d6f1f58 commit 0c97f58
Show file tree
Hide file tree
Showing 2 changed files with 269 additions and 264 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@

# (optional) metrics
from nvflare.client.tracking import SummaryWriter
summary_writer = SummaryWriter()

print_config()

# (2) initializes NVFlare client API
flare.init()

# Setup data directory
directory = os.environ.get("MONAI_DATA_DIRECTORY")
root_dir = tempfile.mkdtemp() if directory is None else directory
Expand Down Expand Up @@ -94,12 +96,11 @@
train_handlers=StatsHandler(),
)

# (2) initializes NVFlare client API
flare.init()

# (optional) calculate total steps
steps = max_epochs * len(train_loader)
# Run the training

summary_writer = SummaryWriter()
while flare.is_running():
# (3) receives FLModel from NVFlare
input_model = flare.receive()
Expand Down
Loading

0 comments on commit 0c97f58

Please sign in to comment.