Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
niklastheman committed Jan 12, 2024
1 parent 3d5b5af commit 764bd5f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fedn/fedn/utils/plugins/androidhelper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import os
import struct
import tempfile
Expand All @@ -17,9 +16,7 @@ def __init__(self):
super().__init__()

# function to calculate an incremental weighted average of the weights
def increment_average(
model, model_next, num_examples, total_examples
):
def increment_average(self, model, model_next, num_examples, total_examples):
"""Incremental weighted average of model weights.
:param model: Current model weights.
Expand Down Expand Up @@ -74,7 +71,7 @@ def save(self, weights, path=None):
if not path:
path = self.get_tmp_path()

byte_array = struct.pack("f"*len(weights),*weights)
byte_array = struct.pack("f"*len(weights), *weights)
with open(path, "wb") as file:
file.write(byte_array)

Expand Down

0 comments on commit 764bd5f

Please sign in to comment.