Skip to content

Commit

Permalink
Remove log
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes committed Mar 15, 2024
1 parent 3e1a121 commit 3ffe3f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions examples/fl-dp-sa/fl_dp_sa/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def weighted_average(metrics: List[Tuple[int, Metrics]]) -> Metrics:
parameters = ndarrays_to_parameters(ndarrays)


# Define core strategy
# Define strategy
strategy = FedAvg(
fraction_fit=0.2,
fraction_evaluate=0.0, # Disable evaluation for demo purpose
Expand All @@ -48,9 +48,6 @@ def weighted_average(metrics: List[Tuple[int, Metrics]]) -> Metrics:
fit_metrics_aggregation_fn=weighted_average,
initial_parameters=parameters,
)


# Wrap the core strategy
strategy = DifferentialPrivacyClientSideFixedClipping(
strategy, noise_multiplier=0.2, clipping_norm=10, num_sampled_clients=20
)
Expand Down
1 change: 0 additions & 1 deletion examples/fl-dp-sa/fl_dp_sa/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def apply_transforms(batch):

def train(net, trainloader, valloader, epochs, device):
"""Train the model on the training set."""
log(INFO, "Starting training...")
net.to(device) # move model to GPU if available
criterion = torch.nn.CrossEntropyLoss().to(device)
optimizer = torch.optim.Adam(net.parameters())
Expand Down

0 comments on commit 3ffe3f5

Please sign in to comment.