diff --git a/src/py/flwr/cli/config_utils.py b/src/py/flwr/cli/config_utils.py index 5e5f56555da..233d35a5fa1 100644 --- a/src/py/flwr/cli/config_utils.py +++ b/src/py/flwr/cli/config_utils.py @@ -74,13 +74,13 @@ def get_fab_metadata(fab_file: Union[Path, bytes]) -> Tuple[str, str]: Returns ------- Tuple[str, str] - The `fab_version` and `fab_id` of the given Flower App Bundle. + The `fab_id` and `fab_version` of the given Flower App Bundle. """ conf = get_fab_config(fab_file) return ( - conf["project"]["version"], f"{conf['tool']['flwr']['app']['publisher']}/{conf['project']['name']}", + conf["project"]["version"], ) diff --git a/src/py/flwr/server/superlink/driver/driver_servicer.py b/src/py/flwr/server/superlink/driver/driver_servicer.py index 14e88d08da5..73cd1c73a6f 100644 --- a/src/py/flwr/server/superlink/driver/driver_servicer.py +++ b/src/py/flwr/server/superlink/driver/driver_servicer.py @@ -23,7 +23,12 @@ import grpc from flwr.common.logger import log -from flwr.common.serde import fab_to_proto, user_config_from_proto, user_config_to_proto +from flwr.common.serde import ( + fab_from_proto, + fab_to_proto, + user_config_from_proto, + user_config_to_proto, +) from flwr.common.typing import Fab from flwr.proto import driver_pb2_grpc # pylint: disable=E0611 from flwr.proto.driver_pb2 import ( # pylint: disable=E0611 @@ -75,12 +80,13 @@ def CreateRun( """Create run ID.""" log(DEBUG, "DriverServicer.CreateRun") state: State = self.state_factory.state() - if request.HasField("fab") and request.fab.HasField("content"): + if request.HasField("fab"): + fab = fab_from_proto(request.fab) ffs: Ffs = self.ffs_factory.ffs() - fab_hash = ffs.put(request.fab.content, {}) + fab_hash = ffs.put(fab.content, {}) _raise_if( - fab_hash != request.fab.hash_str, - f"FAB ({request.fab}) hash from request doesn't match contents", + fab_hash != fab.hash_str, + f"FAB ({fab.hash_str}) hash from request doesn't match contents", ) else: fab_hash = ""