flwr 1.18.0__py3-none-any.whl → 1.19.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flwr/app/__init__.py +15 -0
- flwr/app/error.py +68 -0
- flwr/app/metadata.py +223 -0
- flwr/cli/build.py +82 -57
- flwr/cli/log.py +3 -3
- flwr/cli/login/login.py +3 -7
- flwr/cli/ls.py +15 -36
- flwr/cli/new/templates/app/code/client.baseline.py.tpl +1 -1
- flwr/cli/new/templates/app/code/model.baseline.py.tpl +1 -1
- flwr/cli/new/templates/app/code/server.baseline.py.tpl +2 -3
- flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +14 -17
- flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +1 -1
- flwr/cli/run/run.py +10 -18
- flwr/cli/stop.py +2 -2
- flwr/cli/utils.py +31 -5
- flwr/client/__init__.py +2 -2
- flwr/client/client_app.py +1 -1
- flwr/client/clientapp/__init__.py +0 -7
- flwr/client/grpc_adapter_client/connection.py +4 -4
- flwr/client/grpc_rere_client/connection.py +130 -60
- flwr/client/grpc_rere_client/grpc_adapter.py +34 -6
- flwr/client/message_handler/message_handler.py +1 -1
- flwr/client/mod/comms_mods.py +36 -17
- flwr/client/rest_client/connection.py +173 -67
- flwr/clientapp/__init__.py +15 -0
- flwr/common/__init__.py +2 -2
- flwr/common/auth_plugin/__init__.py +2 -0
- flwr/common/auth_plugin/auth_plugin.py +29 -3
- flwr/common/constant.py +36 -7
- flwr/common/event_log_plugin/event_log_plugin.py +3 -3
- flwr/common/exit_handlers.py +30 -0
- flwr/common/heartbeat.py +165 -0
- flwr/common/inflatable.py +290 -0
- flwr/common/inflatable_grpc_utils.py +99 -0
- flwr/common/inflatable_rest_utils.py +99 -0
- flwr/common/inflatable_utils.py +341 -0
- flwr/common/message.py +110 -242
- flwr/common/record/__init__.py +2 -1
- flwr/common/record/array.py +323 -0
- flwr/common/record/arrayrecord.py +103 -225
- flwr/common/record/configrecord.py +59 -4
- flwr/common/record/conversion_utils.py +1 -1
- flwr/common/record/metricrecord.py +55 -4
- flwr/common/record/recorddict.py +69 -1
- flwr/common/recorddict_compat.py +2 -2
- flwr/common/retry_invoker.py +5 -1
- flwr/common/serde.py +59 -183
- flwr/common/serde_utils.py +175 -0
- flwr/common/typing.py +5 -3
- flwr/compat/__init__.py +15 -0
- flwr/compat/client/__init__.py +15 -0
- flwr/{client → compat/client}/app.py +19 -159
- flwr/compat/common/__init__.py +15 -0
- flwr/compat/server/__init__.py +15 -0
- flwr/compat/server/app.py +174 -0
- flwr/compat/simulation/__init__.py +15 -0
- flwr/proto/fleet_pb2.py +32 -27
- flwr/proto/fleet_pb2.pyi +49 -35
- flwr/proto/fleet_pb2_grpc.py +117 -13
- flwr/proto/fleet_pb2_grpc.pyi +47 -6
- flwr/proto/heartbeat_pb2.py +33 -0
- flwr/proto/heartbeat_pb2.pyi +66 -0
- flwr/proto/heartbeat_pb2_grpc.py +4 -0
- flwr/proto/heartbeat_pb2_grpc.pyi +4 -0
- flwr/proto/message_pb2.py +28 -11
- flwr/proto/message_pb2.pyi +125 -0
- flwr/proto/recorddict_pb2.py +16 -28
- flwr/proto/recorddict_pb2.pyi +46 -64
- flwr/proto/run_pb2.py +24 -32
- flwr/proto/run_pb2.pyi +4 -52
- flwr/proto/serverappio_pb2.py +32 -23
- flwr/proto/serverappio_pb2.pyi +45 -3
- flwr/proto/serverappio_pb2_grpc.py +138 -34
- flwr/proto/serverappio_pb2_grpc.pyi +54 -13
- flwr/proto/simulationio_pb2.py +12 -11
- flwr/proto/simulationio_pb2_grpc.py +35 -0
- flwr/proto/simulationio_pb2_grpc.pyi +14 -0
- flwr/server/__init__.py +1 -1
- flwr/server/app.py +68 -186
- flwr/server/compat/app_utils.py +50 -28
- flwr/server/fleet_event_log_interceptor.py +2 -2
- flwr/server/grid/grpc_grid.py +104 -34
- flwr/server/grid/inmemory_grid.py +5 -4
- flwr/server/serverapp/app.py +18 -0
- flwr/server/superlink/ffs/__init__.py +2 -0
- flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +13 -3
- flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +101 -7
- flwr/server/superlink/fleet/message_handler/message_handler.py +135 -18
- flwr/server/superlink/fleet/rest_rere/rest_api.py +72 -11
- flwr/server/superlink/fleet/vce/vce_api.py +6 -3
- flwr/server/superlink/linkstate/in_memory_linkstate.py +138 -43
- flwr/server/superlink/linkstate/linkstate.py +53 -20
- flwr/server/superlink/linkstate/sqlite_linkstate.py +149 -55
- flwr/server/superlink/linkstate/utils.py +33 -29
- flwr/server/superlink/serverappio/serverappio_grpc.py +3 -0
- flwr/server/superlink/serverappio/serverappio_servicer.py +211 -57
- flwr/server/superlink/simulation/simulationio_servicer.py +25 -1
- flwr/server/superlink/utils.py +44 -2
- flwr/server/utils/validator.py +2 -2
- flwr/serverapp/__init__.py +15 -0
- flwr/simulation/app.py +17 -0
- flwr/supercore/__init__.py +15 -0
- flwr/supercore/object_store/__init__.py +24 -0
- flwr/supercore/object_store/in_memory_object_store.py +229 -0
- flwr/supercore/object_store/object_store.py +192 -0
- flwr/supercore/object_store/object_store_factory.py +44 -0
- flwr/superexec/deployment.py +6 -2
- flwr/superexec/exec_event_log_interceptor.py +4 -4
- flwr/superexec/exec_grpc.py +7 -3
- flwr/superexec/exec_servicer.py +125 -23
- flwr/superexec/exec_user_auth_interceptor.py +37 -8
- flwr/superexec/executor.py +4 -0
- flwr/superexec/simulation.py +7 -1
- flwr/superlink/__init__.py +15 -0
- flwr/{client/supernode → supernode}/__init__.py +0 -7
- flwr/{client/nodestate/nodestate.py → supernode/cli/__init__.py} +7 -14
- flwr/{client/supernode/app.py → supernode/cli/flower_supernode.py} +3 -12
- flwr/supernode/cli/flwr_clientapp.py +81 -0
- flwr/supernode/nodestate/in_memory_nodestate.py +190 -0
- flwr/supernode/nodestate/nodestate.py +212 -0
- flwr/supernode/runtime/__init__.py +15 -0
- flwr/{client/clientapp/app.py → supernode/runtime/run_clientapp.py} +25 -56
- flwr/supernode/servicer/__init__.py +15 -0
- flwr/supernode/servicer/clientappio/__init__.py +24 -0
- flwr/supernode/start_client_internal.py +491 -0
- {flwr-1.18.0.dist-info → flwr-1.19.0.dist-info}/METADATA +5 -4
- {flwr-1.18.0.dist-info → flwr-1.19.0.dist-info}/RECORD +141 -108
- {flwr-1.18.0.dist-info → flwr-1.19.0.dist-info}/WHEEL +1 -1
- {flwr-1.18.0.dist-info → flwr-1.19.0.dist-info}/entry_points.txt +2 -2
- flwr/client/heartbeat.py +0 -74
- flwr/client/nodestate/in_memory_nodestate.py +0 -38
- /flwr/{client → compat/client}/grpc_client/__init__.py +0 -0
- /flwr/{client → compat/client}/grpc_client/connection.py +0 -0
- /flwr/{client → supernode}/nodestate/__init__.py +0 -0
- /flwr/{client → supernode}/nodestate/nodestate_factory.py +0 -0
- /flwr/{client/clientapp → supernode/servicer/clientappio}/clientappio_servicer.py +0 -0
flwr/proto/serverappio_pb2.py
CHANGED
|
@@ -12,6 +12,7 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
|
|
15
16
|
from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
|
|
16
17
|
from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2
|
|
17
18
|
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
|
@@ -19,33 +20,41 @@ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
|
19
20
|
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/serverappio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"!\n\x0fGetNodesRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"3\n\x10GetNodesResponse\x12\x1f\n\x05nodes\x18\x01 \x03(\x0b\x32\x10.flwr.proto.Node\"
|
|
23
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/serverappio.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/heartbeat.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"!\n\x0fGetNodesRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"3\n\x10GetNodesResponse\x12\x1f\n\x05nodes\x18\x01 \x03(\x0b\x32\x10.flwr.proto.Node\"\x8a\x01\n\x16PushInsMessagesRequest\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\x12\x34\n\x14message_object_trees\x18\x03 \x03(\x0b\x32\x16.flwr.proto.ObjectTree\"\xcc\x01\n\x17PushInsMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12O\n\x0fobjects_to_push\x18\x02 \x03(\x0b\x32\x36.flwr.proto.PushInsMessagesResponse.ObjectsToPushEntry\x1aK\n\x12ObjectsToPushEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.flwr.proto.ObjectIDs:\x02\x38\x01\"=\n\x16PullResMessagesRequest\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\"\xe3\x01\n\x17PullResMessagesResponse\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12O\n\x0fobjects_to_pull\x18\x02 \x03(\x0b\x32\x36.flwr.proto.PullResMessagesResponse.ObjectsToPullEntry\x1aK\n\x12ObjectsToPullEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.flwr.proto.ObjectIDs:\x02\x38\x01\"\x1c\n\x1aPullServerAppInputsRequest\"\x7f\n\x1bPullServerAppInputsResponse\x12$\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Fab\"S\n\x1bPushServerAppOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1e\n\x1cPushServerAppOutputsResponse2\xd7\t\n\x0bServerAppIo\x12G\n\x08GetNodes\x12\x1b.flwr.proto.GetNodesRequest\x1a\x1c.flwr.proto.GetNodesResponse\"\x00\x12Y\n\x0cPushMessages\x12\".flwr.proto.PushInsMessagesRequest\x1a#.flwr.proto.PushInsMessagesResponse\"\x00\x12Y\n\x0cPullMessages\x12\".flwr.proto.PullResMessagesRequest\x1a#.flwr.proto.PullResMessagesResponse\"\x00\x12\x41\n\x06GetRun\x12\x19.flwr.proto.GetRunRequest\x1a\x1a.flwr.proto.GetRunResponse\"\x00\x12\x41\n\x06GetFab\x12\x19.flwr.proto.GetFabRequest\x1a\x1a.flwr.proto.GetFabResponse\"\x00\x12h\n\x13PullServerAppInputs\x12&.flwr.proto.PullServerAppInputsRequest\x1a\'.flwr.proto.PullServerAppInputsResponse\"\x00\x12k\n\x14PushServerAppOutputs\x12\'.flwr.proto.PushServerAppOutputsRequest\x1a(.flwr.proto.PushServerAppOutputsResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x12S\n\x0cGetRunStatus\x12\x1f.flwr.proto.GetRunStatusRequest\x1a .flwr.proto.GetRunStatusResponse\"\x00\x12G\n\x08PushLogs\x12\x1b.flwr.proto.PushLogsRequest\x1a\x1c.flwr.proto.PushLogsResponse\"\x00\x12_\n\x10SendAppHeartbeat\x12#.flwr.proto.SendAppHeartbeatRequest\x1a$.flwr.proto.SendAppHeartbeatResponse\"\x00\x12M\n\nPushObject\x12\x1d.flwr.proto.PushObjectRequest\x1a\x1e.flwr.proto.PushObjectResponse\"\x00\x12M\n\nPullObject\x12\x1d.flwr.proto.PullObjectRequest\x1a\x1e.flwr.proto.PullObjectResponse\"\x00\x12q\n\x16\x43onfirmMessageReceived\x12).flwr.proto.ConfirmMessageReceivedRequest\x1a*.flwr.proto.ConfirmMessageReceivedResponse\"\x00\x62\x06proto3')
|
|
23
24
|
|
|
24
25
|
_globals = globals()
|
|
25
26
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
26
27
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.serverappio_pb2', _globals)
|
|
27
28
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
28
29
|
DESCRIPTOR._options = None
|
|
29
|
-
_globals['
|
|
30
|
-
_globals['
|
|
31
|
-
_globals['
|
|
32
|
-
_globals['
|
|
33
|
-
_globals['
|
|
34
|
-
_globals['
|
|
35
|
-
_globals['
|
|
36
|
-
_globals['
|
|
37
|
-
_globals['
|
|
38
|
-
_globals['
|
|
39
|
-
_globals['
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
44
|
-
_globals['
|
|
45
|
-
_globals['
|
|
46
|
-
_globals['
|
|
47
|
-
_globals['
|
|
48
|
-
_globals['
|
|
49
|
-
_globals['
|
|
50
|
-
_globals['
|
|
30
|
+
_globals['_PUSHINSMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._options = None
|
|
31
|
+
_globals['_PUSHINSMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._serialized_options = b'8\001'
|
|
32
|
+
_globals['_PULLRESMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._options = None
|
|
33
|
+
_globals['_PULLRESMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._serialized_options = b'8\001'
|
|
34
|
+
_globals['_GETNODESREQUEST']._serialized_start=187
|
|
35
|
+
_globals['_GETNODESREQUEST']._serialized_end=220
|
|
36
|
+
_globals['_GETNODESRESPONSE']._serialized_start=222
|
|
37
|
+
_globals['_GETNODESRESPONSE']._serialized_end=273
|
|
38
|
+
_globals['_PUSHINSMESSAGESREQUEST']._serialized_start=276
|
|
39
|
+
_globals['_PUSHINSMESSAGESREQUEST']._serialized_end=414
|
|
40
|
+
_globals['_PUSHINSMESSAGESRESPONSE']._serialized_start=417
|
|
41
|
+
_globals['_PUSHINSMESSAGESRESPONSE']._serialized_end=621
|
|
42
|
+
_globals['_PUSHINSMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._serialized_start=546
|
|
43
|
+
_globals['_PUSHINSMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._serialized_end=621
|
|
44
|
+
_globals['_PULLRESMESSAGESREQUEST']._serialized_start=623
|
|
45
|
+
_globals['_PULLRESMESSAGESREQUEST']._serialized_end=684
|
|
46
|
+
_globals['_PULLRESMESSAGESRESPONSE']._serialized_start=687
|
|
47
|
+
_globals['_PULLRESMESSAGESRESPONSE']._serialized_end=914
|
|
48
|
+
_globals['_PULLRESMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._serialized_start=839
|
|
49
|
+
_globals['_PULLRESMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._serialized_end=914
|
|
50
|
+
_globals['_PULLSERVERAPPINPUTSREQUEST']._serialized_start=916
|
|
51
|
+
_globals['_PULLSERVERAPPINPUTSREQUEST']._serialized_end=944
|
|
52
|
+
_globals['_PULLSERVERAPPINPUTSRESPONSE']._serialized_start=946
|
|
53
|
+
_globals['_PULLSERVERAPPINPUTSRESPONSE']._serialized_end=1073
|
|
54
|
+
_globals['_PUSHSERVERAPPOUTPUTSREQUEST']._serialized_start=1075
|
|
55
|
+
_globals['_PUSHSERVERAPPOUTPUTSREQUEST']._serialized_end=1158
|
|
56
|
+
_globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_start=1160
|
|
57
|
+
_globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_end=1190
|
|
58
|
+
_globals['_SERVERAPPIO']._serialized_start=1193
|
|
59
|
+
_globals['_SERVERAPPIO']._serialized_end=2432
|
|
51
60
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/serverappio_pb2.pyi
CHANGED
|
@@ -44,27 +44,50 @@ class PushInsMessagesRequest(google.protobuf.message.Message):
|
|
|
44
44
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
45
45
|
MESSAGES_LIST_FIELD_NUMBER: builtins.int
|
|
46
46
|
RUN_ID_FIELD_NUMBER: builtins.int
|
|
47
|
+
MESSAGE_OBJECT_TREES_FIELD_NUMBER: builtins.int
|
|
47
48
|
@property
|
|
48
49
|
def messages_list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.Message]: ...
|
|
49
50
|
run_id: builtins.int
|
|
51
|
+
@property
|
|
52
|
+
def message_object_trees(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.ObjectTree]: ...
|
|
50
53
|
def __init__(self,
|
|
51
54
|
*,
|
|
52
55
|
messages_list: typing.Optional[typing.Iterable[flwr.proto.message_pb2.Message]] = ...,
|
|
53
56
|
run_id: builtins.int = ...,
|
|
57
|
+
message_object_trees: typing.Optional[typing.Iterable[flwr.proto.message_pb2.ObjectTree]] = ...,
|
|
54
58
|
) -> None: ...
|
|
55
|
-
def ClearField(self, field_name: typing_extensions.Literal["messages_list",b"messages_list","run_id",b"run_id"]) -> None: ...
|
|
59
|
+
def ClearField(self, field_name: typing_extensions.Literal["message_object_trees",b"message_object_trees","messages_list",b"messages_list","run_id",b"run_id"]) -> None: ...
|
|
56
60
|
global___PushInsMessagesRequest = PushInsMessagesRequest
|
|
57
61
|
|
|
58
62
|
class PushInsMessagesResponse(google.protobuf.message.Message):
|
|
59
63
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
64
|
+
class ObjectsToPushEntry(google.protobuf.message.Message):
|
|
65
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
66
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
67
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
68
|
+
key: typing.Text
|
|
69
|
+
@property
|
|
70
|
+
def value(self) -> flwr.proto.message_pb2.ObjectIDs: ...
|
|
71
|
+
def __init__(self,
|
|
72
|
+
*,
|
|
73
|
+
key: typing.Text = ...,
|
|
74
|
+
value: typing.Optional[flwr.proto.message_pb2.ObjectIDs] = ...,
|
|
75
|
+
) -> None: ...
|
|
76
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
|
77
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
78
|
+
|
|
60
79
|
MESSAGE_IDS_FIELD_NUMBER: builtins.int
|
|
80
|
+
OBJECTS_TO_PUSH_FIELD_NUMBER: builtins.int
|
|
61
81
|
@property
|
|
62
82
|
def message_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
|
|
83
|
+
@property
|
|
84
|
+
def objects_to_push(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.message_pb2.ObjectIDs]: ...
|
|
63
85
|
def __init__(self,
|
|
64
86
|
*,
|
|
65
87
|
message_ids: typing.Optional[typing.Iterable[typing.Text]] = ...,
|
|
88
|
+
objects_to_push: typing.Optional[typing.Mapping[typing.Text, flwr.proto.message_pb2.ObjectIDs]] = ...,
|
|
66
89
|
) -> None: ...
|
|
67
|
-
def ClearField(self, field_name: typing_extensions.Literal["message_ids",b"message_ids"]) -> None: ...
|
|
90
|
+
def ClearField(self, field_name: typing_extensions.Literal["message_ids",b"message_ids","objects_to_push",b"objects_to_push"]) -> None: ...
|
|
68
91
|
global___PushInsMessagesResponse = PushInsMessagesResponse
|
|
69
92
|
|
|
70
93
|
class PullResMessagesRequest(google.protobuf.message.Message):
|
|
@@ -85,14 +108,33 @@ global___PullResMessagesRequest = PullResMessagesRequest
|
|
|
85
108
|
|
|
86
109
|
class PullResMessagesResponse(google.protobuf.message.Message):
|
|
87
110
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
111
|
+
class ObjectsToPullEntry(google.protobuf.message.Message):
|
|
112
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
113
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
114
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
115
|
+
key: typing.Text
|
|
116
|
+
@property
|
|
117
|
+
def value(self) -> flwr.proto.message_pb2.ObjectIDs: ...
|
|
118
|
+
def __init__(self,
|
|
119
|
+
*,
|
|
120
|
+
key: typing.Text = ...,
|
|
121
|
+
value: typing.Optional[flwr.proto.message_pb2.ObjectIDs] = ...,
|
|
122
|
+
) -> None: ...
|
|
123
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
|
124
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
125
|
+
|
|
88
126
|
MESSAGES_LIST_FIELD_NUMBER: builtins.int
|
|
127
|
+
OBJECTS_TO_PULL_FIELD_NUMBER: builtins.int
|
|
89
128
|
@property
|
|
90
129
|
def messages_list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.Message]: ...
|
|
130
|
+
@property
|
|
131
|
+
def objects_to_pull(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.message_pb2.ObjectIDs]: ...
|
|
91
132
|
def __init__(self,
|
|
92
133
|
*,
|
|
93
134
|
messages_list: typing.Optional[typing.Iterable[flwr.proto.message_pb2.Message]] = ...,
|
|
135
|
+
objects_to_pull: typing.Optional[typing.Mapping[typing.Text, flwr.proto.message_pb2.ObjectIDs]] = ...,
|
|
94
136
|
) -> None: ...
|
|
95
|
-
def ClearField(self, field_name: typing_extensions.Literal["messages_list",b"messages_list"]) -> None: ...
|
|
137
|
+
def ClearField(self, field_name: typing_extensions.Literal["messages_list",b"messages_list","objects_to_pull",b"objects_to_pull"]) -> None: ...
|
|
96
138
|
global___PullResMessagesResponse = PullResMessagesResponse
|
|
97
139
|
|
|
98
140
|
class PullServerAppInputsRequest(google.protobuf.message.Message):
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import grpc
|
|
4
4
|
|
|
5
5
|
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
6
|
+
from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
|
|
6
7
|
from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
|
|
8
|
+
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
|
7
9
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
8
10
|
from flwr.proto import serverappio_pb2 as flwr_dot_proto_dot_serverappio__pb2
|
|
9
11
|
|
|
@@ -17,11 +19,6 @@ class ServerAppIoStub(object):
|
|
|
17
19
|
Args:
|
|
18
20
|
channel: A grpc.Channel.
|
|
19
21
|
"""
|
|
20
|
-
self.CreateRun = channel.unary_unary(
|
|
21
|
-
'/flwr.proto.ServerAppIo/CreateRun',
|
|
22
|
-
request_serializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.SerializeToString,
|
|
23
|
-
response_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
|
|
24
|
-
)
|
|
25
22
|
self.GetNodes = channel.unary_unary(
|
|
26
23
|
'/flwr.proto.ServerAppIo/GetNodes',
|
|
27
24
|
request_serializer=flwr_dot_proto_dot_serverappio__pb2.GetNodesRequest.SerializeToString,
|
|
@@ -72,18 +69,31 @@ class ServerAppIoStub(object):
|
|
|
72
69
|
request_serializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
|
|
73
70
|
response_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
|
|
74
71
|
)
|
|
72
|
+
self.SendAppHeartbeat = channel.unary_unary(
|
|
73
|
+
'/flwr.proto.ServerAppIo/SendAppHeartbeat',
|
|
74
|
+
request_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
|
|
75
|
+
response_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
|
|
76
|
+
)
|
|
77
|
+
self.PushObject = channel.unary_unary(
|
|
78
|
+
'/flwr.proto.ServerAppIo/PushObject',
|
|
79
|
+
request_serializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
|
|
80
|
+
response_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
|
|
81
|
+
)
|
|
82
|
+
self.PullObject = channel.unary_unary(
|
|
83
|
+
'/flwr.proto.ServerAppIo/PullObject',
|
|
84
|
+
request_serializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
|
|
85
|
+
response_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
|
|
86
|
+
)
|
|
87
|
+
self.ConfirmMessageReceived = channel.unary_unary(
|
|
88
|
+
'/flwr.proto.ServerAppIo/ConfirmMessageReceived',
|
|
89
|
+
request_serializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.SerializeToString,
|
|
90
|
+
response_deserializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.FromString,
|
|
91
|
+
)
|
|
75
92
|
|
|
76
93
|
|
|
77
94
|
class ServerAppIoServicer(object):
|
|
78
95
|
"""Missing associated documentation comment in .proto file."""
|
|
79
96
|
|
|
80
|
-
def CreateRun(self, request, context):
|
|
81
|
-
"""Request run_id
|
|
82
|
-
"""
|
|
83
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
84
|
-
context.set_details('Method not implemented!')
|
|
85
|
-
raise NotImplementedError('Method not implemented!')
|
|
86
|
-
|
|
87
97
|
def GetNodes(self, request, context):
|
|
88
98
|
"""Return a set of nodes
|
|
89
99
|
"""
|
|
@@ -154,14 +164,37 @@ class ServerAppIoServicer(object):
|
|
|
154
164
|
context.set_details('Method not implemented!')
|
|
155
165
|
raise NotImplementedError('Method not implemented!')
|
|
156
166
|
|
|
167
|
+
def SendAppHeartbeat(self, request, context):
|
|
168
|
+
"""Heartbeat
|
|
169
|
+
"""
|
|
170
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
171
|
+
context.set_details('Method not implemented!')
|
|
172
|
+
raise NotImplementedError('Method not implemented!')
|
|
173
|
+
|
|
174
|
+
def PushObject(self, request, context):
|
|
175
|
+
"""Push Object
|
|
176
|
+
"""
|
|
177
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
178
|
+
context.set_details('Method not implemented!')
|
|
179
|
+
raise NotImplementedError('Method not implemented!')
|
|
180
|
+
|
|
181
|
+
def PullObject(self, request, context):
|
|
182
|
+
"""Pull Object
|
|
183
|
+
"""
|
|
184
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
185
|
+
context.set_details('Method not implemented!')
|
|
186
|
+
raise NotImplementedError('Method not implemented!')
|
|
187
|
+
|
|
188
|
+
def ConfirmMessageReceived(self, request, context):
|
|
189
|
+
"""Confirm Message Received
|
|
190
|
+
"""
|
|
191
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
192
|
+
context.set_details('Method not implemented!')
|
|
193
|
+
raise NotImplementedError('Method not implemented!')
|
|
194
|
+
|
|
157
195
|
|
|
158
196
|
def add_ServerAppIoServicer_to_server(servicer, server):
|
|
159
197
|
rpc_method_handlers = {
|
|
160
|
-
'CreateRun': grpc.unary_unary_rpc_method_handler(
|
|
161
|
-
servicer.CreateRun,
|
|
162
|
-
request_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.FromString,
|
|
163
|
-
response_serializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.SerializeToString,
|
|
164
|
-
),
|
|
165
198
|
'GetNodes': grpc.unary_unary_rpc_method_handler(
|
|
166
199
|
servicer.GetNodes,
|
|
167
200
|
request_deserializer=flwr_dot_proto_dot_serverappio__pb2.GetNodesRequest.FromString,
|
|
@@ -212,6 +245,26 @@ def add_ServerAppIoServicer_to_server(servicer, server):
|
|
|
212
245
|
request_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.FromString,
|
|
213
246
|
response_serializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.SerializeToString,
|
|
214
247
|
),
|
|
248
|
+
'SendAppHeartbeat': grpc.unary_unary_rpc_method_handler(
|
|
249
|
+
servicer.SendAppHeartbeat,
|
|
250
|
+
request_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.FromString,
|
|
251
|
+
response_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.SerializeToString,
|
|
252
|
+
),
|
|
253
|
+
'PushObject': grpc.unary_unary_rpc_method_handler(
|
|
254
|
+
servicer.PushObject,
|
|
255
|
+
request_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.FromString,
|
|
256
|
+
response_serializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.SerializeToString,
|
|
257
|
+
),
|
|
258
|
+
'PullObject': grpc.unary_unary_rpc_method_handler(
|
|
259
|
+
servicer.PullObject,
|
|
260
|
+
request_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.FromString,
|
|
261
|
+
response_serializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.SerializeToString,
|
|
262
|
+
),
|
|
263
|
+
'ConfirmMessageReceived': grpc.unary_unary_rpc_method_handler(
|
|
264
|
+
servicer.ConfirmMessageReceived,
|
|
265
|
+
request_deserializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.FromString,
|
|
266
|
+
response_serializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.SerializeToString,
|
|
267
|
+
),
|
|
215
268
|
}
|
|
216
269
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
217
270
|
'flwr.proto.ServerAppIo', rpc_method_handlers)
|
|
@@ -222,23 +275,6 @@ def add_ServerAppIoServicer_to_server(servicer, server):
|
|
|
222
275
|
class ServerAppIo(object):
|
|
223
276
|
"""Missing associated documentation comment in .proto file."""
|
|
224
277
|
|
|
225
|
-
@staticmethod
|
|
226
|
-
def CreateRun(request,
|
|
227
|
-
target,
|
|
228
|
-
options=(),
|
|
229
|
-
channel_credentials=None,
|
|
230
|
-
call_credentials=None,
|
|
231
|
-
insecure=False,
|
|
232
|
-
compression=None,
|
|
233
|
-
wait_for_ready=None,
|
|
234
|
-
timeout=None,
|
|
235
|
-
metadata=None):
|
|
236
|
-
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ServerAppIo/CreateRun',
|
|
237
|
-
flwr_dot_proto_dot_run__pb2.CreateRunRequest.SerializeToString,
|
|
238
|
-
flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
|
|
239
|
-
options, channel_credentials,
|
|
240
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
241
|
-
|
|
242
278
|
@staticmethod
|
|
243
279
|
def GetNodes(request,
|
|
244
280
|
target,
|
|
@@ -408,3 +444,71 @@ class ServerAppIo(object):
|
|
|
408
444
|
flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
|
|
409
445
|
options, channel_credentials,
|
|
410
446
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
447
|
+
|
|
448
|
+
@staticmethod
|
|
449
|
+
def SendAppHeartbeat(request,
|
|
450
|
+
target,
|
|
451
|
+
options=(),
|
|
452
|
+
channel_credentials=None,
|
|
453
|
+
call_credentials=None,
|
|
454
|
+
insecure=False,
|
|
455
|
+
compression=None,
|
|
456
|
+
wait_for_ready=None,
|
|
457
|
+
timeout=None,
|
|
458
|
+
metadata=None):
|
|
459
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ServerAppIo/SendAppHeartbeat',
|
|
460
|
+
flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
|
|
461
|
+
flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
|
|
462
|
+
options, channel_credentials,
|
|
463
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
464
|
+
|
|
465
|
+
@staticmethod
|
|
466
|
+
def PushObject(request,
|
|
467
|
+
target,
|
|
468
|
+
options=(),
|
|
469
|
+
channel_credentials=None,
|
|
470
|
+
call_credentials=None,
|
|
471
|
+
insecure=False,
|
|
472
|
+
compression=None,
|
|
473
|
+
wait_for_ready=None,
|
|
474
|
+
timeout=None,
|
|
475
|
+
metadata=None):
|
|
476
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ServerAppIo/PushObject',
|
|
477
|
+
flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
|
|
478
|
+
flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
|
|
479
|
+
options, channel_credentials,
|
|
480
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
481
|
+
|
|
482
|
+
@staticmethod
|
|
483
|
+
def PullObject(request,
|
|
484
|
+
target,
|
|
485
|
+
options=(),
|
|
486
|
+
channel_credentials=None,
|
|
487
|
+
call_credentials=None,
|
|
488
|
+
insecure=False,
|
|
489
|
+
compression=None,
|
|
490
|
+
wait_for_ready=None,
|
|
491
|
+
timeout=None,
|
|
492
|
+
metadata=None):
|
|
493
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ServerAppIo/PullObject',
|
|
494
|
+
flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
|
|
495
|
+
flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
|
|
496
|
+
options, channel_credentials,
|
|
497
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
498
|
+
|
|
499
|
+
@staticmethod
|
|
500
|
+
def ConfirmMessageReceived(request,
|
|
501
|
+
target,
|
|
502
|
+
options=(),
|
|
503
|
+
channel_credentials=None,
|
|
504
|
+
call_credentials=None,
|
|
505
|
+
insecure=False,
|
|
506
|
+
compression=None,
|
|
507
|
+
wait_for_ready=None,
|
|
508
|
+
timeout=None,
|
|
509
|
+
metadata=None):
|
|
510
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ServerAppIo/ConfirmMessageReceived',
|
|
511
|
+
flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.SerializeToString,
|
|
512
|
+
flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.FromString,
|
|
513
|
+
options, channel_credentials,
|
|
514
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -4,18 +4,15 @@ isort:skip_file
|
|
|
4
4
|
"""
|
|
5
5
|
import abc
|
|
6
6
|
import flwr.proto.fab_pb2
|
|
7
|
+
import flwr.proto.heartbeat_pb2
|
|
7
8
|
import flwr.proto.log_pb2
|
|
9
|
+
import flwr.proto.message_pb2
|
|
8
10
|
import flwr.proto.run_pb2
|
|
9
11
|
import flwr.proto.serverappio_pb2
|
|
10
12
|
import grpc
|
|
11
13
|
|
|
12
14
|
class ServerAppIoStub:
|
|
13
15
|
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
14
|
-
CreateRun: grpc.UnaryUnaryMultiCallable[
|
|
15
|
-
flwr.proto.run_pb2.CreateRunRequest,
|
|
16
|
-
flwr.proto.run_pb2.CreateRunResponse]
|
|
17
|
-
"""Request run_id"""
|
|
18
|
-
|
|
19
16
|
GetNodes: grpc.UnaryUnaryMultiCallable[
|
|
20
17
|
flwr.proto.serverappio_pb2.GetNodesRequest,
|
|
21
18
|
flwr.proto.serverappio_pb2.GetNodesResponse]
|
|
@@ -66,16 +63,28 @@ class ServerAppIoStub:
|
|
|
66
63
|
flwr.proto.log_pb2.PushLogsResponse]
|
|
67
64
|
"""Push ServerApp logs"""
|
|
68
65
|
|
|
66
|
+
SendAppHeartbeat: grpc.UnaryUnaryMultiCallable[
|
|
67
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
68
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse]
|
|
69
|
+
"""Heartbeat"""
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
PushObject: grpc.UnaryUnaryMultiCallable[
|
|
72
|
+
flwr.proto.message_pb2.PushObjectRequest,
|
|
73
|
+
flwr.proto.message_pb2.PushObjectResponse]
|
|
74
|
+
"""Push Object"""
|
|
75
|
+
|
|
76
|
+
PullObject: grpc.UnaryUnaryMultiCallable[
|
|
77
|
+
flwr.proto.message_pb2.PullObjectRequest,
|
|
78
|
+
flwr.proto.message_pb2.PullObjectResponse]
|
|
79
|
+
"""Pull Object"""
|
|
80
|
+
|
|
81
|
+
ConfirmMessageReceived: grpc.UnaryUnaryMultiCallable[
|
|
82
|
+
flwr.proto.message_pb2.ConfirmMessageReceivedRequest,
|
|
83
|
+
flwr.proto.message_pb2.ConfirmMessageReceivedResponse]
|
|
84
|
+
"""Confirm Message Received"""
|
|
78
85
|
|
|
86
|
+
|
|
87
|
+
class ServerAppIoServicer(metaclass=abc.ABCMeta):
|
|
79
88
|
@abc.abstractmethod
|
|
80
89
|
def GetNodes(self,
|
|
81
90
|
request: flwr.proto.serverappio_pb2.GetNodesRequest,
|
|
@@ -156,5 +165,37 @@ class ServerAppIoServicer(metaclass=abc.ABCMeta):
|
|
|
156
165
|
"""Push ServerApp logs"""
|
|
157
166
|
pass
|
|
158
167
|
|
|
168
|
+
@abc.abstractmethod
|
|
169
|
+
def SendAppHeartbeat(self,
|
|
170
|
+
request: flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
171
|
+
context: grpc.ServicerContext,
|
|
172
|
+
) -> flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse:
|
|
173
|
+
"""Heartbeat"""
|
|
174
|
+
pass
|
|
175
|
+
|
|
176
|
+
@abc.abstractmethod
|
|
177
|
+
def PushObject(self,
|
|
178
|
+
request: flwr.proto.message_pb2.PushObjectRequest,
|
|
179
|
+
context: grpc.ServicerContext,
|
|
180
|
+
) -> flwr.proto.message_pb2.PushObjectResponse:
|
|
181
|
+
"""Push Object"""
|
|
182
|
+
pass
|
|
183
|
+
|
|
184
|
+
@abc.abstractmethod
|
|
185
|
+
def PullObject(self,
|
|
186
|
+
request: flwr.proto.message_pb2.PullObjectRequest,
|
|
187
|
+
context: grpc.ServicerContext,
|
|
188
|
+
) -> flwr.proto.message_pb2.PullObjectResponse:
|
|
189
|
+
"""Pull Object"""
|
|
190
|
+
pass
|
|
191
|
+
|
|
192
|
+
@abc.abstractmethod
|
|
193
|
+
def ConfirmMessageReceived(self,
|
|
194
|
+
request: flwr.proto.message_pb2.ConfirmMessageReceivedRequest,
|
|
195
|
+
context: grpc.ServicerContext,
|
|
196
|
+
) -> flwr.proto.message_pb2.ConfirmMessageReceivedResponse:
|
|
197
|
+
"""Confirm Message Received"""
|
|
198
|
+
pass
|
|
199
|
+
|
|
159
200
|
|
|
160
201
|
def add_ServerAppIoServicer_to_server(servicer: ServerAppIoServicer, server: grpc.Server) -> None: ...
|
flwr/proto/simulationio_pb2.py
CHANGED
|
@@ -12,27 +12,28 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
|
|
15
16
|
from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
|
|
16
17
|
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
|
17
18
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
18
19
|
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lwr/proto/simulationio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"\x1d\n\x1bPullSimulationInputsRequest\"\x80\x01\n\x1cPullSimulationInputsResponse\x12$\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Fab\"T\n\x1cPushSimulationOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1f\n\x1dPushSimulationOutputsResponse2\
|
|
22
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lwr/proto/simulationio.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/heartbeat.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"\x1d\n\x1bPullSimulationInputsRequest\"\x80\x01\n\x1cPullSimulationInputsResponse\x12$\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Fab\"T\n\x1cPushSimulationOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1f\n\x1dPushSimulationOutputsResponse2\xb5\x05\n\x0cSimulationIo\x12k\n\x14PullSimulationInputs\x12\'.flwr.proto.PullSimulationInputsRequest\x1a(.flwr.proto.PullSimulationInputsResponse\"\x00\x12n\n\x15PushSimulationOutputs\x12(.flwr.proto.PushSimulationOutputsRequest\x1a).flwr.proto.PushSimulationOutputsResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x12G\n\x08PushLogs\x12\x1b.flwr.proto.PushLogsRequest\x1a\x1c.flwr.proto.PushLogsResponse\"\x00\x12k\n\x14GetFederationOptions\x12\'.flwr.proto.GetFederationOptionsRequest\x1a(.flwr.proto.GetFederationOptionsResponse\"\x00\x12S\n\x0cGetRunStatus\x12\x1f.flwr.proto.GetRunStatusRequest\x1a .flwr.proto.GetRunStatusResponse\"\x00\x12_\n\x10SendAppHeartbeat\x12#.flwr.proto.SendAppHeartbeatRequest\x1a$.flwr.proto.SendAppHeartbeatResponse\"\x00\x62\x06proto3')
|
|
22
23
|
|
|
23
24
|
_globals = globals()
|
|
24
25
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
25
26
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.simulationio_pb2', _globals)
|
|
26
27
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
27
28
|
DESCRIPTOR._options = None
|
|
28
|
-
_globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_start=
|
|
29
|
-
_globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_end=
|
|
30
|
-
_globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_start=
|
|
31
|
-
_globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_end=
|
|
32
|
-
_globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_start=
|
|
33
|
-
_globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_end=
|
|
34
|
-
_globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_start=
|
|
35
|
-
_globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_end=
|
|
36
|
-
_globals['_SIMULATIONIO']._serialized_start=
|
|
37
|
-
_globals['_SIMULATIONIO']._serialized_end=
|
|
29
|
+
_globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_start=165
|
|
30
|
+
_globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_end=194
|
|
31
|
+
_globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_start=197
|
|
32
|
+
_globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_end=325
|
|
33
|
+
_globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_start=327
|
|
34
|
+
_globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_end=411
|
|
35
|
+
_globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_start=413
|
|
36
|
+
_globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_end=444
|
|
37
|
+
_globals['_SIMULATIONIO']._serialized_start=447
|
|
38
|
+
_globals['_SIMULATIONIO']._serialized_end=1140
|
|
38
39
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
3
|
import grpc
|
|
4
4
|
|
|
5
|
+
from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
|
|
5
6
|
from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
|
|
6
7
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
7
8
|
from flwr.proto import simulationio_pb2 as flwr_dot_proto_dot_simulationio__pb2
|
|
@@ -46,6 +47,11 @@ class SimulationIoStub(object):
|
|
|
46
47
|
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
|
|
47
48
|
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
|
|
48
49
|
)
|
|
50
|
+
self.SendAppHeartbeat = channel.unary_unary(
|
|
51
|
+
'/flwr.proto.SimulationIo/SendAppHeartbeat',
|
|
52
|
+
request_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
|
|
53
|
+
response_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
|
|
54
|
+
)
|
|
49
55
|
|
|
50
56
|
|
|
51
57
|
class SimulationIoServicer(object):
|
|
@@ -93,6 +99,13 @@ class SimulationIoServicer(object):
|
|
|
93
99
|
context.set_details('Method not implemented!')
|
|
94
100
|
raise NotImplementedError('Method not implemented!')
|
|
95
101
|
|
|
102
|
+
def SendAppHeartbeat(self, request, context):
|
|
103
|
+
"""Heartbeat
|
|
104
|
+
"""
|
|
105
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
106
|
+
context.set_details('Method not implemented!')
|
|
107
|
+
raise NotImplementedError('Method not implemented!')
|
|
108
|
+
|
|
96
109
|
|
|
97
110
|
def add_SimulationIoServicer_to_server(servicer, server):
|
|
98
111
|
rpc_method_handlers = {
|
|
@@ -126,6 +139,11 @@ def add_SimulationIoServicer_to_server(servicer, server):
|
|
|
126
139
|
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.FromString,
|
|
127
140
|
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.SerializeToString,
|
|
128
141
|
),
|
|
142
|
+
'SendAppHeartbeat': grpc.unary_unary_rpc_method_handler(
|
|
143
|
+
servicer.SendAppHeartbeat,
|
|
144
|
+
request_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.FromString,
|
|
145
|
+
response_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.SerializeToString,
|
|
146
|
+
),
|
|
129
147
|
}
|
|
130
148
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
131
149
|
'flwr.proto.SimulationIo', rpc_method_handlers)
|
|
@@ -237,3 +255,20 @@ class SimulationIo(object):
|
|
|
237
255
|
flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
|
|
238
256
|
options, channel_credentials,
|
|
239
257
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
258
|
+
|
|
259
|
+
@staticmethod
|
|
260
|
+
def SendAppHeartbeat(request,
|
|
261
|
+
target,
|
|
262
|
+
options=(),
|
|
263
|
+
channel_credentials=None,
|
|
264
|
+
call_credentials=None,
|
|
265
|
+
insecure=False,
|
|
266
|
+
compression=None,
|
|
267
|
+
wait_for_ready=None,
|
|
268
|
+
timeout=None,
|
|
269
|
+
metadata=None):
|
|
270
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/SendAppHeartbeat',
|
|
271
|
+
flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
|
|
272
|
+
flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
|
|
273
|
+
options, channel_credentials,
|
|
274
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
5
|
import abc
|
|
6
|
+
import flwr.proto.heartbeat_pb2
|
|
6
7
|
import flwr.proto.log_pb2
|
|
7
8
|
import flwr.proto.run_pb2
|
|
8
9
|
import flwr.proto.simulationio_pb2
|
|
@@ -40,6 +41,11 @@ class SimulationIoStub:
|
|
|
40
41
|
flwr.proto.run_pb2.GetRunStatusResponse]
|
|
41
42
|
"""Get Run Status"""
|
|
42
43
|
|
|
44
|
+
SendAppHeartbeat: grpc.UnaryUnaryMultiCallable[
|
|
45
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
46
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse]
|
|
47
|
+
"""Heartbeat"""
|
|
48
|
+
|
|
43
49
|
|
|
44
50
|
class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
45
51
|
@abc.abstractmethod
|
|
@@ -90,5 +96,13 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
90
96
|
"""Get Run Status"""
|
|
91
97
|
pass
|
|
92
98
|
|
|
99
|
+
@abc.abstractmethod
|
|
100
|
+
def SendAppHeartbeat(self,
|
|
101
|
+
request: flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
102
|
+
context: grpc.ServicerContext,
|
|
103
|
+
) -> flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse:
|
|
104
|
+
"""Heartbeat"""
|
|
105
|
+
pass
|
|
106
|
+
|
|
93
107
|
|
|
94
108
|
def add_SimulationIoServicer_to_server(servicer: SimulationIoServicer, server: grpc.Server) -> None: ...
|
flwr/server/__init__.py
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"""Flower server."""
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
from ..compat.server.app import start_server as start_server # Deprecated
|
|
18
19
|
from . import strategy
|
|
19
20
|
from . import workflow as workflow
|
|
20
|
-
from .app import start_server as start_server
|
|
21
21
|
from .client_manager import ClientManager as ClientManager
|
|
22
22
|
from .client_manager import SimpleClientManager as SimpleClientManager
|
|
23
23
|
from .compat import LegacyContext as LegacyContext
|