flwr-nightly 1.19.0.dev20250513__py3-none-any.whl → 1.19.0.dev20250514__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.
@@ -49,6 +49,12 @@ from flwr.proto.heartbeat_pb2 import ( # pylint: disable=E0611
49
49
  SendNodeHeartbeatRequest,
50
50
  SendNodeHeartbeatResponse,
51
51
  )
52
+ from flwr.proto.message_pb2 import ( # pylint: disable=E0611
53
+ PullObjectRequest,
54
+ PullObjectResponse,
55
+ PushObjectRequest,
56
+ PushObjectResponse,
57
+ )
52
58
  from flwr.proto.run_pb2 import GetRunRequest, GetRunResponse # pylint: disable=E0611
53
59
 
54
60
  T = TypeVar("T", bound=GrpcMessage)
@@ -151,3 +157,15 @@ class GrpcAdapter:
151
157
  ) -> GetFabResponse:
152
158
  """."""
153
159
  return self._send_and_receive(request, GetFabResponse, **kwargs)
160
+
161
+ def PushObject( # pylint: disable=C0103
162
+ self, request: PushObjectRequest, **kwargs: Any
163
+ ) -> PushObjectResponse:
164
+ """."""
165
+ return self._send_and_receive(request, PushObjectResponse, **kwargs)
166
+
167
+ def PullObject( # pylint: disable=C0103
168
+ self, request: PullObjectRequest, **kwargs: Any
169
+ ) -> PullObjectResponse:
170
+ """."""
171
+ return self._send_and_receive(request, PullObjectResponse, **kwargs)
flwr/common/heartbeat.py CHANGED
@@ -17,8 +17,16 @@
17
17
 
18
18
  import random
19
19
  import threading
20
- from typing import Callable
20
+ from typing import Callable, Union
21
21
 
22
+ import grpc
23
+
24
+ # pylint: disable=E0611
25
+ from flwr.proto.heartbeat_pb2 import SendAppHeartbeatRequest
26
+ from flwr.proto.serverappio_pb2_grpc import ServerAppIoStub
27
+ from flwr.proto.simulationio_pb2_grpc import SimulationIoStub
28
+
29
+ # pylint: enable=E0611
22
30
  from .constant import (
23
31
  HEARTBEAT_BASE_MULTIPLIER,
24
32
  HEARTBEAT_CALL_TIMEOUT,
@@ -106,3 +114,52 @@ class HeartbeatSender:
106
114
  if not self._stop_event.is_set():
107
115
  if not self.heartbeat_fn():
108
116
  raise HeartbeatFailure
117
+
118
+
119
+ def get_grpc_app_heartbeat_fn(
120
+ stub: Union[ServerAppIoStub, SimulationIoStub],
121
+ run_id: int,
122
+ *,
123
+ failure_message: str,
124
+ ) -> Callable[[], bool]:
125
+ """Get the function to send a heartbeat to gRPC endpoint.
126
+
127
+ This function is for app heartbeats only. It is not used for node heartbeats.
128
+
129
+ Parameters
130
+ ----------
131
+ stub : Union[ServerAppIoStub, SimulationIoStub]
132
+ gRPC stub to send the heartbeat.
133
+ run_id : int
134
+ The run ID to use in the heartbeat request.
135
+ failure_message : str
136
+ Error message to raise if the heartbeat fails.
137
+
138
+ Returns
139
+ -------
140
+ Callable[[], bool]
141
+ Function that sends a heartbeat to the gRPC endpoint.
142
+ """
143
+ # Construct the heartbeat request
144
+ req = SendAppHeartbeatRequest(
145
+ run_id=run_id, heartbeat_interval=HEARTBEAT_DEFAULT_INTERVAL
146
+ )
147
+
148
+ def fn() -> bool:
149
+ # Call ServerAppIo API
150
+ try:
151
+ res = stub.SendAppHeartbeat(req)
152
+ except grpc.RpcError as e:
153
+ status_code = e.code()
154
+ if status_code == grpc.StatusCode.UNAVAILABLE:
155
+ return False
156
+ if status_code == grpc.StatusCode.DEADLINE_EXCEEDED:
157
+ return False
158
+ raise
159
+
160
+ # Check if not successful
161
+ if not res.success:
162
+ raise RuntimeError(failure_message)
163
+ return True
164
+
165
+ return fn
flwr/common/inflatable.py CHANGED
@@ -105,5 +105,24 @@ def _get_object_body(object_content: bytes) -> bytes:
105
105
 
106
106
  def get_object_type_from_object_content(object_content: bytes) -> str:
107
107
  """Return object type from bytes."""
108
- obj_head: str = _get_object_head(object_content).decode(encoding="utf-8")
109
- return obj_head.split(TYPE_BODY_LEN_DIVIDER, 1)[0]
108
+ return get_object_head_values_from_object_content(object_content)[0]
109
+
110
+
111
+ def get_object_body_len_from_object_content(object_content: bytes) -> int:
112
+ """Return length of the object body."""
113
+ return get_object_head_values_from_object_content(object_content)[1]
114
+
115
+
116
+ def check_body_len_consistency(object_content: bytes) -> bool:
117
+ """Check that the object body is of length as specified in the head."""
118
+ body_len = get_object_body_len_from_object_content(object_content)
119
+ return body_len == len(_get_object_body(object_content))
120
+
121
+
122
+ def get_object_head_values_from_object_content(
123
+ object_content: bytes,
124
+ ) -> tuple[str, int]:
125
+ """Return object type and body length from object content."""
126
+ head = _get_object_head(object_content).decode(encoding="utf-8")
127
+ obj_type, body_len = head.split(TYPE_BODY_LEN_DIVIDER, 1)
128
+ return obj_type, int(body_len)
flwr/proto/fleet_pb2.py CHANGED
@@ -19,7 +19,7 @@ from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
19
19
  from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
20
20
 
21
21
 
22
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/fleet.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/heartbeat.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x18\x66lwr/proto/message.proto\"/\n\x11\x43reateNodeRequest\x12\x1a\n\x12heartbeat_interval\x18\x01 \x01(\x01\"4\n\x12\x43reateNodeResponse\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"3\n\x11\x44\x65leteNodeRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"\x14\n\x12\x44\x65leteNodeResponse\"J\n\x13PullMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x13\n\x0bmessage_ids\x18\x02 \x03(\t\"l\n\x14PullMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"a\n\x13PushMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"\xb0\x01\n\x14PushMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12>\n\x07results\x18\x02 \x03(\x0b\x32-.flwr.proto.PushMessagesResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x1e\n\tReconnect\x12\x11\n\treconnect\x18\x01 \x01(\x04\x32\xb9\x04\n\x05\x46leet\x12M\n\nCreateNode\x12\x1d.flwr.proto.CreateNodeRequest\x1a\x1e.flwr.proto.CreateNodeResponse\"\x00\x12M\n\nDeleteNode\x12\x1d.flwr.proto.DeleteNodeRequest\x1a\x1e.flwr.proto.DeleteNodeResponse\"\x00\x12\x62\n\x11SendNodeHeartbeat\x12$.flwr.proto.SendNodeHeartbeatRequest\x1a%.flwr.proto.SendNodeHeartbeatResponse\"\x00\x12S\n\x0cPullMessages\x12\x1f.flwr.proto.PullMessagesRequest\x1a .flwr.proto.PullMessagesResponse\"\x00\x12S\n\x0cPushMessages\x12\x1f.flwr.proto.PushMessagesRequest\x1a .flwr.proto.PushMessagesResponse\"\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\x62\x06proto3')
22
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/fleet.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/heartbeat.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x18\x66lwr/proto/message.proto\"/\n\x11\x43reateNodeRequest\x12\x1a\n\x12heartbeat_interval\x18\x01 \x01(\x01\"4\n\x12\x43reateNodeResponse\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"3\n\x11\x44\x65leteNodeRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"\x14\n\x12\x44\x65leteNodeResponse\"J\n\x13PullMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x13\n\x0bmessage_ids\x18\x02 \x03(\t\"l\n\x14PullMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"a\n\x13PushMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"\xb0\x01\n\x14PushMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12>\n\x07results\x18\x02 \x03(\x0b\x32-.flwr.proto.PushMessagesResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x1e\n\tReconnect\x12\x11\n\treconnect\x18\x01 \x01(\x04\x32\xd7\x05\n\x05\x46leet\x12M\n\nCreateNode\x12\x1d.flwr.proto.CreateNodeRequest\x1a\x1e.flwr.proto.CreateNodeResponse\"\x00\x12M\n\nDeleteNode\x12\x1d.flwr.proto.DeleteNodeRequest\x1a\x1e.flwr.proto.DeleteNodeResponse\"\x00\x12\x62\n\x11SendNodeHeartbeat\x12$.flwr.proto.SendNodeHeartbeatRequest\x1a%.flwr.proto.SendNodeHeartbeatResponse\"\x00\x12S\n\x0cPullMessages\x12\x1f.flwr.proto.PullMessagesRequest\x1a .flwr.proto.PullMessagesResponse\"\x00\x12S\n\x0cPushMessages\x12\x1f.flwr.proto.PushMessagesRequest\x1a .flwr.proto.PushMessagesResponse\"\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\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\x62\x06proto3')
23
23
 
24
24
  _globals = globals()
25
25
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -49,5 +49,5 @@ if _descriptor._USE_C_DESCRIPTORS == False:
49
49
  _globals['_RECONNECT']._serialized_start=801
50
50
  _globals['_RECONNECT']._serialized_end=831
51
51
  _globals['_FLEET']._serialized_start=834
52
- _globals['_FLEET']._serialized_end=1403
52
+ _globals['_FLEET']._serialized_end=1561
53
53
  # @@protoc_insertion_point(module_scope)
@@ -5,6 +5,7 @@ import grpc
5
5
  from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
6
6
  from flwr.proto import fleet_pb2 as flwr_dot_proto_dot_fleet__pb2
7
7
  from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
8
+ from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
8
9
  from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
9
10
 
10
11
 
@@ -52,6 +53,16 @@ class FleetStub(object):
52
53
  request_serializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.SerializeToString,
53
54
  response_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
54
55
  )
56
+ self.PushObject = channel.unary_unary(
57
+ '/flwr.proto.Fleet/PushObject',
58
+ request_serializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
59
+ response_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
60
+ )
61
+ self.PullObject = channel.unary_unary(
62
+ '/flwr.proto.Fleet/PullObject',
63
+ request_serializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
64
+ response_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
65
+ )
55
66
 
56
67
 
57
68
  class FleetServicer(object):
@@ -106,6 +117,20 @@ class FleetServicer(object):
106
117
  context.set_details('Method not implemented!')
107
118
  raise NotImplementedError('Method not implemented!')
108
119
 
120
+ def PushObject(self, request, context):
121
+ """Push Object
122
+ """
123
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
124
+ context.set_details('Method not implemented!')
125
+ raise NotImplementedError('Method not implemented!')
126
+
127
+ def PullObject(self, request, context):
128
+ """Pull Object
129
+ """
130
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
131
+ context.set_details('Method not implemented!')
132
+ raise NotImplementedError('Method not implemented!')
133
+
109
134
 
110
135
  def add_FleetServicer_to_server(servicer, server):
111
136
  rpc_method_handlers = {
@@ -144,6 +169,16 @@ def add_FleetServicer_to_server(servicer, server):
144
169
  request_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.FromString,
145
170
  response_serializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.SerializeToString,
146
171
  ),
172
+ 'PushObject': grpc.unary_unary_rpc_method_handler(
173
+ servicer.PushObject,
174
+ request_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.FromString,
175
+ response_serializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.SerializeToString,
176
+ ),
177
+ 'PullObject': grpc.unary_unary_rpc_method_handler(
178
+ servicer.PullObject,
179
+ request_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.FromString,
180
+ response_serializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.SerializeToString,
181
+ ),
147
182
  }
148
183
  generic_handler = grpc.method_handlers_generic_handler(
149
184
  'flwr.proto.Fleet', rpc_method_handlers)
@@ -272,3 +307,37 @@ class Fleet(object):
272
307
  flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
273
308
  options, channel_credentials,
274
309
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
310
+
311
+ @staticmethod
312
+ def PushObject(request,
313
+ target,
314
+ options=(),
315
+ channel_credentials=None,
316
+ call_credentials=None,
317
+ insecure=False,
318
+ compression=None,
319
+ wait_for_ready=None,
320
+ timeout=None,
321
+ metadata=None):
322
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/PushObject',
323
+ flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
324
+ flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
325
+ options, channel_credentials,
326
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
327
+
328
+ @staticmethod
329
+ def PullObject(request,
330
+ target,
331
+ options=(),
332
+ channel_credentials=None,
333
+ call_credentials=None,
334
+ insecure=False,
335
+ compression=None,
336
+ wait_for_ready=None,
337
+ timeout=None,
338
+ metadata=None):
339
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/PullObject',
340
+ flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
341
+ flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
342
+ options, channel_credentials,
343
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -6,6 +6,7 @@ import abc
6
6
  import flwr.proto.fab_pb2
7
7
  import flwr.proto.fleet_pb2
8
8
  import flwr.proto.heartbeat_pb2
9
+ import flwr.proto.message_pb2
9
10
  import flwr.proto.run_pb2
10
11
  import grpc
11
12
 
@@ -48,6 +49,16 @@ class FleetStub:
48
49
  flwr.proto.fab_pb2.GetFabResponse]
49
50
  """Get FAB"""
50
51
 
52
+ PushObject: grpc.UnaryUnaryMultiCallable[
53
+ flwr.proto.message_pb2.PushObjectRequest,
54
+ flwr.proto.message_pb2.PushObjectResponse]
55
+ """Push Object"""
56
+
57
+ PullObject: grpc.UnaryUnaryMultiCallable[
58
+ flwr.proto.message_pb2.PullObjectRequest,
59
+ flwr.proto.message_pb2.PullObjectResponse]
60
+ """Pull Object"""
61
+
51
62
 
52
63
  class FleetServicer(metaclass=abc.ABCMeta):
53
64
  @abc.abstractmethod
@@ -104,5 +115,21 @@ class FleetServicer(metaclass=abc.ABCMeta):
104
115
  """Get FAB"""
105
116
  pass
106
117
 
118
+ @abc.abstractmethod
119
+ def PushObject(self,
120
+ request: flwr.proto.message_pb2.PushObjectRequest,
121
+ context: grpc.ServicerContext,
122
+ ) -> flwr.proto.message_pb2.PushObjectResponse:
123
+ """Push Object"""
124
+ pass
125
+
126
+ @abc.abstractmethod
127
+ def PullObject(self,
128
+ request: flwr.proto.message_pb2.PullObjectRequest,
129
+ context: grpc.ServicerContext,
130
+ ) -> flwr.proto.message_pb2.PullObjectResponse:
131
+ """Pull Object"""
132
+ pass
133
+
107
134
 
108
135
  def add_FleetServicer_to_server(servicer: FleetServicer, server: grpc.Server) -> None: ...
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
15
15
  from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2
16
16
 
17
17
 
18
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lwr/proto/heartbeat.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"V\n\x18SendNodeHeartbeatRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x1a\n\x12heartbeat_interval\x18\x02 \x01(\x01\",\n\x19SendNodeHeartbeatResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x62\x06proto3')
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lwr/proto/heartbeat.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"V\n\x18SendNodeHeartbeatRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x1a\n\x12heartbeat_interval\x18\x02 \x01(\x01\",\n\x19SendNodeHeartbeatResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"E\n\x17SendAppHeartbeatRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x1a\n\x12heartbeat_interval\x18\x02 \x01(\x01\"+\n\x18SendAppHeartbeatResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x62\x06proto3')
19
19
 
20
20
  _globals = globals()
21
21
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -26,4 +26,8 @@ if _descriptor._USE_C_DESCRIPTORS == False:
26
26
  _globals['_SENDNODEHEARTBEATREQUEST']._serialized_end=151
27
27
  _globals['_SENDNODEHEARTBEATRESPONSE']._serialized_start=153
28
28
  _globals['_SENDNODEHEARTBEATRESPONSE']._serialized_end=197
29
+ _globals['_SENDAPPHEARTBEATREQUEST']._serialized_start=199
30
+ _globals['_SENDAPPHEARTBEATREQUEST']._serialized_end=268
31
+ _globals['_SENDAPPHEARTBEATRESPONSE']._serialized_start=270
32
+ _globals['_SENDAPPHEARTBEATRESPONSE']._serialized_end=313
29
33
  # @@protoc_insertion_point(module_scope)
@@ -38,3 +38,29 @@ class SendNodeHeartbeatResponse(google.protobuf.message.Message):
38
38
  ) -> None: ...
39
39
  def ClearField(self, field_name: typing_extensions.Literal["success",b"success"]) -> None: ...
40
40
  global___SendNodeHeartbeatResponse = SendNodeHeartbeatResponse
41
+
42
+ class SendAppHeartbeatRequest(google.protobuf.message.Message):
43
+ """App Heartbeat messages"""
44
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
45
+ RUN_ID_FIELD_NUMBER: builtins.int
46
+ HEARTBEAT_INTERVAL_FIELD_NUMBER: builtins.int
47
+ run_id: builtins.int
48
+ heartbeat_interval: builtins.float
49
+ def __init__(self,
50
+ *,
51
+ run_id: builtins.int = ...,
52
+ heartbeat_interval: builtins.float = ...,
53
+ ) -> None: ...
54
+ def ClearField(self, field_name: typing_extensions.Literal["heartbeat_interval",b"heartbeat_interval","run_id",b"run_id"]) -> None: ...
55
+ global___SendAppHeartbeatRequest = SendAppHeartbeatRequest
56
+
57
+ class SendAppHeartbeatResponse(google.protobuf.message.Message):
58
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
59
+ SUCCESS_FIELD_NUMBER: builtins.int
60
+ success: builtins.bool
61
+ def __init__(self,
62
+ *,
63
+ success: builtins.bool = ...,
64
+ ) -> None: ...
65
+ def ClearField(self, field_name: typing_extensions.Literal["success",b"success"]) -> None: ...
66
+ global___SendAppHeartbeatResponse = SendAppHeartbeatResponse
flwr/proto/message_pb2.py CHANGED
@@ -17,7 +17,7 @@ from flwr.proto import recorddict_pb2 as flwr_dot_proto_dot_recorddict__pb2
17
17
  from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
18
18
 
19
19
 
20
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x66lwr/proto/message.proto\x12\nflwr.proto\x1a\x16\x66lwr/proto/error.proto\x1a\x1b\x66lwr/proto/recorddict.proto\x1a\x1a\x66lwr/proto/transport.proto\"|\n\x07Message\x12&\n\x08metadata\x18\x01 \x01(\x0b\x32\x14.flwr.proto.Metadata\x12\'\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x16.flwr.proto.RecordDict\x12 \n\x05\x65rror\x18\x03 \x01(\x0b\x32\x11.flwr.proto.Error\"\xd0\x02\n\x07\x43ontext\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\x12\x38\n\x0bnode_config\x18\x03 \x03(\x0b\x32#.flwr.proto.Context.NodeConfigEntry\x12%\n\x05state\x18\x04 \x01(\x0b\x32\x16.flwr.proto.RecordDict\x12\x36\n\nrun_config\x18\x05 \x03(\x0b\x32\".flwr.proto.Context.RunConfigEntry\x1a\x45\n\x0fNodeConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\x1a\x44\n\x0eRunConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"\xbe\x01\n\x08Metadata\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x12\n\nmessage_id\x18\x02 \x01(\t\x12\x13\n\x0bsrc_node_id\x18\x03 \x01(\x04\x12\x13\n\x0b\x64st_node_id\x18\x04 \x01(\x04\x12\x1b\n\x13reply_to_message_id\x18\x05 \x01(\t\x12\x10\n\x08group_id\x18\x06 \x01(\t\x12\x0b\n\x03ttl\x18\x07 \x01(\x01\x12\x14\n\x0cmessage_type\x18\x08 \x01(\t\x12\x12\n\ncreated_at\x18\t \x01(\x01\x62\x06proto3')
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x66lwr/proto/message.proto\x12\nflwr.proto\x1a\x16\x66lwr/proto/error.proto\x1a\x1b\x66lwr/proto/recorddict.proto\x1a\x1a\x66lwr/proto/transport.proto\"|\n\x07Message\x12&\n\x08metadata\x18\x01 \x01(\x0b\x32\x14.flwr.proto.Metadata\x12\'\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x16.flwr.proto.RecordDict\x12 \n\x05\x65rror\x18\x03 \x01(\x0b\x32\x11.flwr.proto.Error\"\xd0\x02\n\x07\x43ontext\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\x12\x38\n\x0bnode_config\x18\x03 \x03(\x0b\x32#.flwr.proto.Context.NodeConfigEntry\x12%\n\x05state\x18\x04 \x01(\x0b\x32\x16.flwr.proto.RecordDict\x12\x36\n\nrun_config\x18\x05 \x03(\x0b\x32\".flwr.proto.Context.RunConfigEntry\x1a\x45\n\x0fNodeConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\x1a\x44\n\x0eRunConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"\xbe\x01\n\x08Metadata\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x12\n\nmessage_id\x18\x02 \x01(\t\x12\x13\n\x0bsrc_node_id\x18\x03 \x01(\x04\x12\x13\n\x0b\x64st_node_id\x18\x04 \x01(\x04\x12\x1b\n\x13reply_to_message_id\x18\x05 \x01(\t\x12\x10\n\x08group_id\x18\x06 \x01(\t\x12\x0b\n\x03ttl\x18\x07 \x01(\x01\x12\x14\n\x0cmessage_type\x18\x08 \x01(\t\x12\x12\n\ncreated_at\x18\t \x01(\x01\">\n\x11PushObjectRequest\x12\x11\n\tobject_id\x18\x01 \x01(\t\x12\x16\n\x0eobject_content\x18\x02 \x01(\x0c\"\x14\n\x12PushObjectResponse\"&\n\x11PullObjectRequest\x12\x11\n\tobject_id\x18\x01 \x01(\t\",\n\x12PullObjectResponse\x12\x16\n\x0eobject_content\x18\x01 \x01(\x0c\x62\x06proto3')
21
21
 
22
22
  _globals = globals()
23
23
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -38,4 +38,12 @@ if _descriptor._USE_C_DESCRIPTORS == False:
38
38
  _globals['_CONTEXT_RUNCONFIGENTRY']._serialized_end=584
39
39
  _globals['_METADATA']._serialized_start=587
40
40
  _globals['_METADATA']._serialized_end=777
41
+ _globals['_PUSHOBJECTREQUEST']._serialized_start=779
42
+ _globals['_PUSHOBJECTREQUEST']._serialized_end=841
43
+ _globals['_PUSHOBJECTRESPONSE']._serialized_start=843
44
+ _globals['_PUSHOBJECTRESPONSE']._serialized_end=863
45
+ _globals['_PULLOBJECTREQUEST']._serialized_start=865
46
+ _globals['_PULLOBJECTREQUEST']._serialized_end=903
47
+ _globals['_PULLOBJECTRESPONSE']._serialized_start=905
48
+ _globals['_PULLOBJECTRESPONSE']._serialized_end=949
41
49
  # @@protoc_insertion_point(module_scope)
@@ -126,3 +126,47 @@ class Metadata(google.protobuf.message.Message):
126
126
  ) -> None: ...
127
127
  def ClearField(self, field_name: typing_extensions.Literal["created_at",b"created_at","dst_node_id",b"dst_node_id","group_id",b"group_id","message_id",b"message_id","message_type",b"message_type","reply_to_message_id",b"reply_to_message_id","run_id",b"run_id","src_node_id",b"src_node_id","ttl",b"ttl"]) -> None: ...
128
128
  global___Metadata = Metadata
129
+
130
+ class PushObjectRequest(google.protobuf.message.Message):
131
+ """PushObject messages"""
132
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
133
+ OBJECT_ID_FIELD_NUMBER: builtins.int
134
+ OBJECT_CONTENT_FIELD_NUMBER: builtins.int
135
+ object_id: typing.Text
136
+ object_content: builtins.bytes
137
+ def __init__(self,
138
+ *,
139
+ object_id: typing.Text = ...,
140
+ object_content: builtins.bytes = ...,
141
+ ) -> None: ...
142
+ def ClearField(self, field_name: typing_extensions.Literal["object_content",b"object_content","object_id",b"object_id"]) -> None: ...
143
+ global___PushObjectRequest = PushObjectRequest
144
+
145
+ class PushObjectResponse(google.protobuf.message.Message):
146
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
147
+ def __init__(self,
148
+ ) -> None: ...
149
+ global___PushObjectResponse = PushObjectResponse
150
+
151
+ class PullObjectRequest(google.protobuf.message.Message):
152
+ """PullObject messages"""
153
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
154
+ OBJECT_ID_FIELD_NUMBER: builtins.int
155
+ object_id: typing.Text
156
+ def __init__(self,
157
+ *,
158
+ object_id: typing.Text = ...,
159
+ ) -> None: ...
160
+ def ClearField(self, field_name: typing_extensions.Literal["object_id",b"object_id"]) -> None: ...
161
+ global___PullObjectRequest = PullObjectRequest
162
+
163
+ class PullObjectResponse(google.protobuf.message.Message):
164
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
165
+ OBJECT_CONTENT_FIELD_NUMBER: builtins.int
166
+ object_content: builtins.bytes
167
+ def __init__(self,
168
+ *,
169
+ object_content: builtins.bytes = ...,
170
+ ) -> None: ...
171
+ def ClearField(self, field_name: typing_extensions.Literal["object_content",b"object_content"]) -> None: ...
172
+ global___PullObjectResponse = PullObjectResponse
@@ -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,33 @@ 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\"T\n\x16PushInsMessagesRequest\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\".\n\x17PushInsMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\"=\n\x16PullResMessagesRequest\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\"E\n\x17PullResMessagesResponse\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\"\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\xb1\x07\n\x0bServerAppIo\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\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\x62\x06proto3')
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\"T\n\x16PushInsMessagesRequest\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\".\n\x17PushInsMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\"=\n\x16PullResMessagesRequest\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\"E\n\x17PullResMessagesResponse\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\"\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\xb0\t\n\x0bServerAppIo\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\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\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['_GETNODESREQUEST']._serialized_start=159
30
- _globals['_GETNODESREQUEST']._serialized_end=192
31
- _globals['_GETNODESRESPONSE']._serialized_start=194
32
- _globals['_GETNODESRESPONSE']._serialized_end=245
33
- _globals['_PUSHINSMESSAGESREQUEST']._serialized_start=247
34
- _globals['_PUSHINSMESSAGESREQUEST']._serialized_end=331
35
- _globals['_PUSHINSMESSAGESRESPONSE']._serialized_start=333
36
- _globals['_PUSHINSMESSAGESRESPONSE']._serialized_end=379
37
- _globals['_PULLRESMESSAGESREQUEST']._serialized_start=381
38
- _globals['_PULLRESMESSAGESREQUEST']._serialized_end=442
39
- _globals['_PULLRESMESSAGESRESPONSE']._serialized_start=444
40
- _globals['_PULLRESMESSAGESRESPONSE']._serialized_end=513
41
- _globals['_PULLSERVERAPPINPUTSREQUEST']._serialized_start=515
42
- _globals['_PULLSERVERAPPINPUTSREQUEST']._serialized_end=543
43
- _globals['_PULLSERVERAPPINPUTSRESPONSE']._serialized_start=545
44
- _globals['_PULLSERVERAPPINPUTSRESPONSE']._serialized_end=672
45
- _globals['_PUSHSERVERAPPOUTPUTSREQUEST']._serialized_start=674
46
- _globals['_PUSHSERVERAPPOUTPUTSREQUEST']._serialized_end=757
47
- _globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_start=759
48
- _globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_end=789
49
- _globals['_SERVERAPPIO']._serialized_start=792
50
- _globals['_SERVERAPPIO']._serialized_end=1737
30
+ _globals['_GETNODESREQUEST']._serialized_start=187
31
+ _globals['_GETNODESREQUEST']._serialized_end=220
32
+ _globals['_GETNODESRESPONSE']._serialized_start=222
33
+ _globals['_GETNODESRESPONSE']._serialized_end=273
34
+ _globals['_PUSHINSMESSAGESREQUEST']._serialized_start=275
35
+ _globals['_PUSHINSMESSAGESREQUEST']._serialized_end=359
36
+ _globals['_PUSHINSMESSAGESRESPONSE']._serialized_start=361
37
+ _globals['_PUSHINSMESSAGESRESPONSE']._serialized_end=407
38
+ _globals['_PULLRESMESSAGESREQUEST']._serialized_start=409
39
+ _globals['_PULLRESMESSAGESREQUEST']._serialized_end=470
40
+ _globals['_PULLRESMESSAGESRESPONSE']._serialized_start=472
41
+ _globals['_PULLRESMESSAGESRESPONSE']._serialized_end=541
42
+ _globals['_PULLSERVERAPPINPUTSREQUEST']._serialized_start=543
43
+ _globals['_PULLSERVERAPPINPUTSREQUEST']._serialized_end=571
44
+ _globals['_PULLSERVERAPPINPUTSRESPONSE']._serialized_start=573
45
+ _globals['_PULLSERVERAPPINPUTSRESPONSE']._serialized_end=700
46
+ _globals['_PUSHSERVERAPPOUTPUTSREQUEST']._serialized_start=702
47
+ _globals['_PUSHSERVERAPPOUTPUTSREQUEST']._serialized_end=785
48
+ _globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_start=787
49
+ _globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_end=817
50
+ _globals['_SERVERAPPIO']._serialized_start=820
51
+ _globals['_SERVERAPPIO']._serialized_end=2020
51
52
  # @@protoc_insertion_point(module_scope)
@@ -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
 
@@ -72,6 +74,21 @@ class ServerAppIoStub(object):
72
74
  request_serializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
73
75
  response_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
74
76
  )
77
+ self.SendAppHeartbeat = channel.unary_unary(
78
+ '/flwr.proto.ServerAppIo/SendAppHeartbeat',
79
+ request_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
80
+ response_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
81
+ )
82
+ self.PushObject = channel.unary_unary(
83
+ '/flwr.proto.ServerAppIo/PushObject',
84
+ request_serializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
85
+ response_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
86
+ )
87
+ self.PullObject = channel.unary_unary(
88
+ '/flwr.proto.ServerAppIo/PullObject',
89
+ request_serializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
90
+ response_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
91
+ )
75
92
 
76
93
 
77
94
  class ServerAppIoServicer(object):
@@ -154,6 +171,27 @@ class ServerAppIoServicer(object):
154
171
  context.set_details('Method not implemented!')
155
172
  raise NotImplementedError('Method not implemented!')
156
173
 
174
+ def SendAppHeartbeat(self, request, context):
175
+ """Heartbeat
176
+ """
177
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
178
+ context.set_details('Method not implemented!')
179
+ raise NotImplementedError('Method not implemented!')
180
+
181
+ def PushObject(self, request, context):
182
+ """Push 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 PullObject(self, request, context):
189
+ """Pull Object
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 = {
@@ -212,6 +250,21 @@ def add_ServerAppIoServicer_to_server(servicer, server):
212
250
  request_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.FromString,
213
251
  response_serializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.SerializeToString,
214
252
  ),
253
+ 'SendAppHeartbeat': grpc.unary_unary_rpc_method_handler(
254
+ servicer.SendAppHeartbeat,
255
+ request_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.FromString,
256
+ response_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.SerializeToString,
257
+ ),
258
+ 'PushObject': grpc.unary_unary_rpc_method_handler(
259
+ servicer.PushObject,
260
+ request_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.FromString,
261
+ response_serializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.SerializeToString,
262
+ ),
263
+ 'PullObject': grpc.unary_unary_rpc_method_handler(
264
+ servicer.PullObject,
265
+ request_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.FromString,
266
+ response_serializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.SerializeToString,
267
+ ),
215
268
  }
216
269
  generic_handler = grpc.method_handlers_generic_handler(
217
270
  'flwr.proto.ServerAppIo', rpc_method_handlers)
@@ -408,3 +461,54 @@ class ServerAppIo(object):
408
461
  flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
409
462
  options, channel_credentials,
410
463
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
464
+
465
+ @staticmethod
466
+ def SendAppHeartbeat(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/SendAppHeartbeat',
477
+ flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
478
+ flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
479
+ options, channel_credentials,
480
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
481
+
482
+ @staticmethod
483
+ def PushObject(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/PushObject',
494
+ flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
495
+ flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
496
+ options, channel_credentials,
497
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
498
+
499
+ @staticmethod
500
+ def PullObject(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/PullObject',
511
+ flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
512
+ flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
513
+ options, channel_credentials,
514
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)