From dd9cd64c7730028d465f526053e451fe67be9927 Mon Sep 17 00:00:00 2001 From: jafermarq Date: Thu, 14 Mar 2024 00:27:50 +0000 Subject: [PATCH] not loading config --- .../cli/new/templates/app/code/client.pytorch.py.tpl | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/py/flwr/cli/new/templates/app/code/client.pytorch.py.tpl b/src/py/flwr/cli/new/templates/app/code/client.pytorch.py.tpl index 187b2301f72b..d5994716ca74 100644 --- a/src/py/flwr/cli/new/templates/app/code/client.pytorch.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/client.pytorch.py.tpl @@ -1,7 +1,6 @@ """$project_name: A Flower / PyTorch app.""" from flwr.client import NumPyClient, ClientApp -from flwr.cli.flower_toml import load_and_validate_with_defaults from $project_name.task import ( Net, @@ -32,17 +31,10 @@ class FlowerClient(NumPyClient): return loss, len(self.valloader.dataset), {"accuracy": accuracy} -# Load config -cfg, *_ = load_and_validate_with_defaults() - def client_fn(cid: str): # Load model and data net = Net().to(DEVICE) - engine = cfg["flower"]["engine"] - num_partitions = 2 - if "simulation" in engine: - num_partitions = engine["simulation"]["supernode"]["num"] - trainloader, valloader = load_data(int(cid), num_partitions) + trainloader, valloader = load_data(partition_id=int(cid), num_partitions=2) # Return Client instance return FlowerClient(net, trainloader, valloader).to_client()