From a1184ef1ed2ea408345295922608dd017ca71cd0 Mon Sep 17 00:00:00 2001 From: Chong Shen Ng Date: Wed, 11 Dec 2024 22:49:28 +0000 Subject: [PATCH 1/2] Init --- src/proto/flwr/proto/fab.proto | 1 + src/py/flwr/proto/fab_pb2.py | 8 ++++---- src/py/flwr/proto/fab_pb2.pyi | 8 ++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/proto/flwr/proto/fab.proto b/src/proto/flwr/proto/fab.proto index 367b6e5b5c13..dad784019fe6 100644 --- a/src/proto/flwr/proto/fab.proto +++ b/src/proto/flwr/proto/fab.proto @@ -31,5 +31,6 @@ message Fab { message GetFabRequest { Node node = 1; string hash_str = 2; + optional uint64 run_id = 3; } message GetFabResponse { Fab fab = 1; } diff --git a/src/py/flwr/proto/fab_pb2.py b/src/py/flwr/proto/fab_pb2.py index 3a5e50000c10..befbf6881e95 100644 --- a/src/py/flwr/proto/fab_pb2.py +++ b/src/py/flwr/proto/fab_pb2.py @@ -15,7 +15,7 @@ from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"(\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"A\n\rGetFabRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08hash_str\x18\x02 \x01(\t\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"(\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"a\n\rGetFabRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08hash_str\x18\x02 \x01(\t\x12\x13\n\x06run_id\x18\x03 \x01(\x04H\x00\x88\x01\x01\x42\t\n\x07_run_id\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,7 +25,7 @@ _globals['_FAB']._serialized_start=59 _globals['_FAB']._serialized_end=99 _globals['_GETFABREQUEST']._serialized_start=101 - _globals['_GETFABREQUEST']._serialized_end=166 - _globals['_GETFABRESPONSE']._serialized_start=168 - _globals['_GETFABRESPONSE']._serialized_end=214 + _globals['_GETFABREQUEST']._serialized_end=198 + _globals['_GETFABRESPONSE']._serialized_start=200 + _globals['_GETFABRESPONSE']._serialized_end=246 # @@protoc_insertion_point(module_scope) diff --git a/src/py/flwr/proto/fab_pb2.pyi b/src/py/flwr/proto/fab_pb2.pyi index 8cfdcbaf76ad..7da80c72f0d7 100644 --- a/src/py/flwr/proto/fab_pb2.pyi +++ b/src/py/flwr/proto/fab_pb2.pyi @@ -36,16 +36,20 @@ class GetFabRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NODE_FIELD_NUMBER: builtins.int HASH_STR_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int @property def node(self) -> flwr.proto.node_pb2.Node: ... hash_str: typing.Text + run_id: builtins.int def __init__(self, *, node: typing.Optional[flwr.proto.node_pb2.Node] = ..., hash_str: typing.Text = ..., + run_id: typing.Optional[builtins.int] = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["hash_str",b"hash_str","node",b"node"]) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","node",b"node","run_id",b"run_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","hash_str",b"hash_str","node",b"node","run_id",b"run_id"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["_run_id",b"_run_id"]) -> typing.Optional[typing_extensions.Literal["run_id"]]: ... global___GetFabRequest = GetFabRequest class GetFabResponse(google.protobuf.message.Message): From 0ce365dce121566cff14cbe689dec760dd42395f Mon Sep 17 00:00:00 2001 From: Chong Shen Ng Date: Thu, 12 Dec 2024 11:12:23 +0000 Subject: [PATCH 2/2] Make run_id not optional --- src/proto/flwr/proto/fab.proto | 2 +- src/py/flwr/proto/fab_pb2.py | 8 ++++---- src/py/flwr/proto/fab_pb2.pyi | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/proto/flwr/proto/fab.proto b/src/proto/flwr/proto/fab.proto index dad784019fe6..347d755530d7 100644 --- a/src/proto/flwr/proto/fab.proto +++ b/src/proto/flwr/proto/fab.proto @@ -31,6 +31,6 @@ message Fab { message GetFabRequest { Node node = 1; string hash_str = 2; - optional uint64 run_id = 3; + uint64 run_id = 3; } message GetFabResponse { Fab fab = 1; } diff --git a/src/py/flwr/proto/fab_pb2.py b/src/py/flwr/proto/fab_pb2.py index befbf6881e95..1c79d624031a 100644 --- a/src/py/flwr/proto/fab_pb2.py +++ b/src/py/flwr/proto/fab_pb2.py @@ -15,7 +15,7 @@ from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"(\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"a\n\rGetFabRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08hash_str\x18\x02 \x01(\t\x12\x13\n\x06run_id\x18\x03 \x01(\x04H\x00\x88\x01\x01\x42\t\n\x07_run_id\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"(\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"Q\n\rGetFabRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08hash_str\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,7 +25,7 @@ _globals['_FAB']._serialized_start=59 _globals['_FAB']._serialized_end=99 _globals['_GETFABREQUEST']._serialized_start=101 - _globals['_GETFABREQUEST']._serialized_end=198 - _globals['_GETFABRESPONSE']._serialized_start=200 - _globals['_GETFABRESPONSE']._serialized_end=246 + _globals['_GETFABREQUEST']._serialized_end=182 + _globals['_GETFABRESPONSE']._serialized_start=184 + _globals['_GETFABRESPONSE']._serialized_end=230 # @@protoc_insertion_point(module_scope) diff --git a/src/py/flwr/proto/fab_pb2.pyi b/src/py/flwr/proto/fab_pb2.pyi index 7da80c72f0d7..dd5f5045a68e 100644 --- a/src/py/flwr/proto/fab_pb2.pyi +++ b/src/py/flwr/proto/fab_pb2.pyi @@ -45,11 +45,10 @@ class GetFabRequest(google.protobuf.message.Message): *, node: typing.Optional[flwr.proto.node_pb2.Node] = ..., hash_str: typing.Text = ..., - run_id: typing.Optional[builtins.int] = ..., + run_id: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","node",b"node","run_id",b"run_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","hash_str",b"hash_str","node",b"node","run_id",b"run_id"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_run_id",b"_run_id"]) -> typing.Optional[typing_extensions.Literal["run_id"]]: ... + def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["hash_str",b"hash_str","node",b"node","run_id",b"run_id"]) -> None: ... global___GetFabRequest = GetFabRequest class GetFabResponse(google.protobuf.message.Message):