Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelltaylor committed Feb 28, 2024
1 parent b2b5566 commit b5199b1
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions florist/tests/integration/api/test_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
from florist.tests.utils.api.models import MnistNet


def fit_config(
batch_size: int, local_epochs: int, current_server_round: int
) -> Dict[str, int]:
def fit_config(batch_size: int, local_epochs: int, current_server_round: int) -> Dict[str, int]:
return {
"batch_size": batch_size,
"current_server_round": current_server_round,
Expand All @@ -30,9 +28,7 @@ def get_server(
local_epochs: int = 1,
) -> FlServer:
fit_config_fn = partial(fit_config, batch_size, local_epochs)
server = get_server_fedavg(
model=MnistNet(), n_clients=n_clients, fit_config_fn=fit_config_fn
)
server = get_server_fedavg(model=MnistNet(), n_clients=n_clients, fit_config_fn=fit_config_fn)
return server


Expand All @@ -52,10 +48,7 @@ def test_launch() -> None:
client_data_paths = [Path(f"{temp_dir}/{i}") for i in range(n_clients)]
for client_data_path in client_data_paths:
os.mkdir(client_data_path)
clients = [
MnistClient(client_data_path, [], torch.device("cpu"))
for client_data_path in client_data_paths
]
clients = [MnistClient(client_data_path, [], torch.device("cpu")) for client_data_path in client_data_paths]

server_path = os.path.join(temp_dir, "server.out")
client_base_path = f"{temp_dir}/client"
Expand Down

0 comments on commit b5199b1

Please sign in to comment.