Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
niklastheman committed Dec 23, 2024
1 parent 9271df6 commit e55ad72
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
16 changes: 0 additions & 16 deletions fedn/network/storage/statestore/stores/combiner_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ def __init__(
self.status = status
self.updated_at = updated_at

def from_dict(data: dict) -> "Combiner":
return Combiner(
id=str(data["_id"]),
name=data["name"] if "name" in data else None,
address=data["address"] if "address" in data else None,
certificate=data["certificate"] if "certificate" in data else None,
config=data["config"] if "config" in data else None,
fqdn=data["fqdn"] if "fqdn" in data else None,
ip=data["ip"] if "ip" in data else None,
key=data["key"] if "key" in data else None,
parent=data["parent"] if "parent" in data else None,
port=data["port"] if "port" in data else None,
status=data["status"] if "status" in data else None,
updated_at=data["updated_at"] if "updated_at" in data else None,
)


class CombinerStore(MongoDBStore[Combiner]):
def __init__(self, database: Database, collection: str):
Expand Down
10 changes: 0 additions & 10 deletions fedn/network/storage/statestore/stores/round_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ def __init__(self, id: str, round_id: str, status: str, round_config: dict, comb
self.combiners = combiners
self.round_data = round_data

def from_dict(data: dict) -> "Round":
return Round(
id=str(data["_id"]),
round_id=data["round_id"] if "round_id" in data else None,
status=data["status"] if "status" in data else None,
round_config=data["round_config"] if "round_config" in data else None,
combiners=data["combiners"] if "combiners" in data else None,
round_data=data["round_data"] if "round_data" in data else None,
)


class RoundStore(MongoDBStore[Round]):
def __init__(self, database: Database, collection: str):
Expand Down
13 changes: 0 additions & 13 deletions fedn/network/storage/statestore/stores/validation_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@ def __init__(
self.sender = sender
self.receiver = receiver

def from_dict(data: dict) -> "Validation":
return Validation(
id=str(data["_id"]),
model_id=data["modelId"] if "modelId" in data else None,
data=data["data"] if "data" in data else None,
correlation_id=data["correlationId"] if "correlationId" in data else None,
timestamp=data["timestamp"] if "timestamp" in data else None,
session_id=data["sessionId"] if "sessionId" in data else None,
meta=data["meta"] if "meta" in data else None,
sender=data["sender"] if "sender" in data else None,
receiver=data["receiver"] if "receiver" in data else None,
)


class ValidationStore(MongoDBStore[Validation]):
def __init__(self, database: Database, collection: str):
Expand Down

0 comments on commit e55ad72

Please sign in to comment.