diff --git a/fedn/network/storage/statestore/stores/combiner_store.py b/fedn/network/storage/statestore/stores/combiner_store.py index d61cba47..8a938d06 100644 --- a/fedn/network/storage/statestore/stores/combiner_store.py +++ b/fedn/network/storage/statestore/stores/combiner_store.py @@ -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): diff --git a/fedn/network/storage/statestore/stores/round_store.py b/fedn/network/storage/statestore/stores/round_store.py index cd7088e5..9148f0c6 100644 --- a/fedn/network/storage/statestore/stores/round_store.py +++ b/fedn/network/storage/statestore/stores/round_store.py @@ -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): diff --git a/fedn/network/storage/statestore/stores/validation_store.py b/fedn/network/storage/statestore/stores/validation_store.py index 990d4779..f5e9ef60 100644 --- a/fedn/network/storage/statestore/stores/validation_store.py +++ b/fedn/network/storage/statestore/stores/validation_store.py @@ -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):