flwr-nightly 1.20.0.dev20250715__py3-none-any.whl → 1.20.0.dev20250717__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.
@@ -3,35 +3,14 @@
3
3
  isort:skip_file
4
4
  """
5
5
  import builtins
6
- import flwr.proto.fab_pb2
7
- import flwr.proto.message_pb2
8
- import flwr.proto.run_pb2
9
6
  import google.protobuf.descriptor
10
7
  import google.protobuf.internal.containers
11
- import google.protobuf.internal.enum_type_wrapper
12
8
  import google.protobuf.message
13
9
  import typing
14
10
  import typing_extensions
15
11
 
16
12
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
17
13
 
18
- class _ClientAppOutputCode:
19
- ValueType = typing.NewType('ValueType', builtins.int)
20
- V: typing_extensions.TypeAlias = ValueType
21
- class _ClientAppOutputCodeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ClientAppOutputCode.ValueType], builtins.type):
22
- DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
23
- SUCCESS: _ClientAppOutputCode.ValueType # 0
24
- DEADLINE_EXCEEDED: _ClientAppOutputCode.ValueType # 1
25
- UNKNOWN_ERROR: _ClientAppOutputCode.ValueType # 2
26
- class ClientAppOutputCode(_ClientAppOutputCode, metaclass=_ClientAppOutputCodeEnumTypeWrapper):
27
- pass
28
-
29
- SUCCESS: ClientAppOutputCode.ValueType # 0
30
- DEADLINE_EXCEEDED: ClientAppOutputCode.ValueType # 1
31
- UNKNOWN_ERROR: ClientAppOutputCode.ValueType # 2
32
- global___ClientAppOutputCode = ClientAppOutputCode
33
-
34
-
35
14
  class GetRunIdsWithPendingMessagesRequest(google.protobuf.message.Message):
36
15
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
37
16
  def __init__(self,
@@ -73,124 +52,3 @@ class RequestTokenResponse(google.protobuf.message.Message):
73
52
  ) -> None: ...
74
53
  def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
75
54
  global___RequestTokenResponse = RequestTokenResponse
76
-
77
- class ClientAppOutputStatus(google.protobuf.message.Message):
78
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
79
- CODE_FIELD_NUMBER: builtins.int
80
- MESSAGE_FIELD_NUMBER: builtins.int
81
- code: global___ClientAppOutputCode.ValueType
82
- message: typing.Text
83
- def __init__(self,
84
- *,
85
- code: global___ClientAppOutputCode.ValueType = ...,
86
- message: typing.Text = ...,
87
- ) -> None: ...
88
- def ClearField(self, field_name: typing_extensions.Literal["code",b"code","message",b"message"]) -> None: ...
89
- global___ClientAppOutputStatus = ClientAppOutputStatus
90
-
91
- class PullClientAppInputsRequest(google.protobuf.message.Message):
92
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
93
- TOKEN_FIELD_NUMBER: builtins.int
94
- token: typing.Text
95
- def __init__(self,
96
- *,
97
- token: typing.Text = ...,
98
- ) -> None: ...
99
- def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
100
- global___PullClientAppInputsRequest = PullClientAppInputsRequest
101
-
102
- class PullClientAppInputsResponse(google.protobuf.message.Message):
103
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
104
- CONTEXT_FIELD_NUMBER: builtins.int
105
- RUN_FIELD_NUMBER: builtins.int
106
- FAB_FIELD_NUMBER: builtins.int
107
- @property
108
- def context(self) -> flwr.proto.message_pb2.Context: ...
109
- @property
110
- def run(self) -> flwr.proto.run_pb2.Run: ...
111
- @property
112
- def fab(self) -> flwr.proto.fab_pb2.Fab: ...
113
- def __init__(self,
114
- *,
115
- context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
116
- run: typing.Optional[flwr.proto.run_pb2.Run] = ...,
117
- fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
118
- ) -> None: ...
119
- def HasField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> builtins.bool: ...
120
- def ClearField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> None: ...
121
- global___PullClientAppInputsResponse = PullClientAppInputsResponse
122
-
123
- class PushClientAppOutputsRequest(google.protobuf.message.Message):
124
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
125
- TOKEN_FIELD_NUMBER: builtins.int
126
- CONTEXT_FIELD_NUMBER: builtins.int
127
- token: typing.Text
128
- @property
129
- def context(self) -> flwr.proto.message_pb2.Context: ...
130
- def __init__(self,
131
- *,
132
- token: typing.Text = ...,
133
- context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
134
- ) -> None: ...
135
- def HasField(self, field_name: typing_extensions.Literal["context",b"context"]) -> builtins.bool: ...
136
- def ClearField(self, field_name: typing_extensions.Literal["context",b"context","token",b"token"]) -> None: ...
137
- global___PushClientAppOutputsRequest = PushClientAppOutputsRequest
138
-
139
- class PushClientAppOutputsResponse(google.protobuf.message.Message):
140
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
141
- STATUS_FIELD_NUMBER: builtins.int
142
- @property
143
- def status(self) -> global___ClientAppOutputStatus: ...
144
- def __init__(self,
145
- *,
146
- status: typing.Optional[global___ClientAppOutputStatus] = ...,
147
- ) -> None: ...
148
- def HasField(self, field_name: typing_extensions.Literal["status",b"status"]) -> builtins.bool: ...
149
- def ClearField(self, field_name: typing_extensions.Literal["status",b"status"]) -> None: ...
150
- global___PushClientAppOutputsResponse = PushClientAppOutputsResponse
151
-
152
- class PullMessageRequest(google.protobuf.message.Message):
153
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
154
- TOKEN_FIELD_NUMBER: builtins.int
155
- token: typing.Text
156
- def __init__(self,
157
- *,
158
- token: typing.Text = ...,
159
- ) -> None: ...
160
- def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
161
- global___PullMessageRequest = PullMessageRequest
162
-
163
- class PullMessageResponse(google.protobuf.message.Message):
164
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
165
- MESSAGE_FIELD_NUMBER: builtins.int
166
- @property
167
- def message(self) -> flwr.proto.message_pb2.Message: ...
168
- def __init__(self,
169
- *,
170
- message: typing.Optional[flwr.proto.message_pb2.Message] = ...,
171
- ) -> None: ...
172
- def HasField(self, field_name: typing_extensions.Literal["message",b"message"]) -> builtins.bool: ...
173
- def ClearField(self, field_name: typing_extensions.Literal["message",b"message"]) -> None: ...
174
- global___PullMessageResponse = PullMessageResponse
175
-
176
- class PushMessageRequest(google.protobuf.message.Message):
177
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
178
- TOKEN_FIELD_NUMBER: builtins.int
179
- MESSAGE_FIELD_NUMBER: builtins.int
180
- token: typing.Text
181
- @property
182
- def message(self) -> flwr.proto.message_pb2.Message: ...
183
- def __init__(self,
184
- *,
185
- token: typing.Text = ...,
186
- message: typing.Optional[flwr.proto.message_pb2.Message] = ...,
187
- ) -> None: ...
188
- def HasField(self, field_name: typing_extensions.Literal["message",b"message"]) -> builtins.bool: ...
189
- def ClearField(self, field_name: typing_extensions.Literal["message",b"message","token",b"token"]) -> None: ...
190
- global___PushMessageRequest = PushMessageRequest
191
-
192
- class PushMessageResponse(google.protobuf.message.Message):
193
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
194
- def __init__(self,
195
- ) -> None: ...
196
- global___PushMessageResponse = PushMessageResponse
@@ -2,7 +2,9 @@
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
4
 
5
+ from flwr.proto import appio_pb2 as flwr_dot_proto_dot_appio__pb2
5
6
  from flwr.proto import clientappio_pb2 as flwr_dot_proto_dot_clientappio__pb2
7
+ from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
6
8
 
7
9
 
8
10
  class ClientAppIoStub(object):
@@ -26,23 +28,38 @@ class ClientAppIoStub(object):
26
28
  )
27
29
  self.PullClientAppInputs = channel.unary_unary(
28
30
  '/flwr.proto.ClientAppIo/PullClientAppInputs',
29
- request_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
30
- response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
31
+ request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
32
+ response_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
31
33
  )
32
34
  self.PushClientAppOutputs = channel.unary_unary(
33
35
  '/flwr.proto.ClientAppIo/PushClientAppOutputs',
34
- request_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
35
- response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
36
+ request_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
37
+ response_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
36
38
  )
37
39
  self.PushMessage = channel.unary_unary(
38
40
  '/flwr.proto.ClientAppIo/PushMessage',
39
- request_serializer=flwr_dot_proto_dot_clientappio__pb2.PushMessageRequest.SerializeToString,
40
- response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushMessageResponse.FromString,
41
+ request_serializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesRequest.SerializeToString,
42
+ response_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesResponse.FromString,
41
43
  )
42
44
  self.PullMessage = channel.unary_unary(
43
45
  '/flwr.proto.ClientAppIo/PullMessage',
44
- request_serializer=flwr_dot_proto_dot_clientappio__pb2.PullMessageRequest.SerializeToString,
45
- response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullMessageResponse.FromString,
46
+ request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesRequest.SerializeToString,
47
+ response_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesResponse.FromString,
48
+ )
49
+ self.PushObject = channel.unary_unary(
50
+ '/flwr.proto.ClientAppIo/PushObject',
51
+ request_serializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
52
+ response_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
53
+ )
54
+ self.PullObject = channel.unary_unary(
55
+ '/flwr.proto.ClientAppIo/PullObject',
56
+ request_serializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
57
+ response_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
58
+ )
59
+ self.ConfirmMessageReceived = channel.unary_unary(
60
+ '/flwr.proto.ClientAppIo/ConfirmMessageReceived',
61
+ request_serializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.SerializeToString,
62
+ response_deserializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.FromString,
46
63
  )
47
64
 
48
65
 
@@ -91,6 +108,27 @@ class ClientAppIoServicer(object):
91
108
  context.set_details('Method not implemented!')
92
109
  raise NotImplementedError('Method not implemented!')
93
110
 
111
+ def PushObject(self, request, context):
112
+ """Push Object
113
+ """
114
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
115
+ context.set_details('Method not implemented!')
116
+ raise NotImplementedError('Method not implemented!')
117
+
118
+ def PullObject(self, request, context):
119
+ """Pull Object
120
+ """
121
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
122
+ context.set_details('Method not implemented!')
123
+ raise NotImplementedError('Method not implemented!')
124
+
125
+ def ConfirmMessageReceived(self, request, context):
126
+ """Confirm Message Received
127
+ """
128
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
129
+ context.set_details('Method not implemented!')
130
+ raise NotImplementedError('Method not implemented!')
131
+
94
132
 
95
133
  def add_ClientAppIoServicer_to_server(servicer, server):
96
134
  rpc_method_handlers = {
@@ -106,23 +144,38 @@ def add_ClientAppIoServicer_to_server(servicer, server):
106
144
  ),
107
145
  'PullClientAppInputs': grpc.unary_unary_rpc_method_handler(
108
146
  servicer.PullClientAppInputs,
109
- request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.FromString,
110
- response_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.SerializeToString,
147
+ request_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.FromString,
148
+ response_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.SerializeToString,
111
149
  ),
112
150
  'PushClientAppOutputs': grpc.unary_unary_rpc_method_handler(
113
151
  servicer.PushClientAppOutputs,
114
- request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.FromString,
115
- response_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.SerializeToString,
152
+ request_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.FromString,
153
+ response_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.SerializeToString,
116
154
  ),
117
155
  'PushMessage': grpc.unary_unary_rpc_method_handler(
118
156
  servicer.PushMessage,
119
- request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushMessageRequest.FromString,
120
- response_serializer=flwr_dot_proto_dot_clientappio__pb2.PushMessageResponse.SerializeToString,
157
+ request_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesRequest.FromString,
158
+ response_serializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesResponse.SerializeToString,
121
159
  ),
122
160
  'PullMessage': grpc.unary_unary_rpc_method_handler(
123
161
  servicer.PullMessage,
124
- request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullMessageRequest.FromString,
125
- response_serializer=flwr_dot_proto_dot_clientappio__pb2.PullMessageResponse.SerializeToString,
162
+ request_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesRequest.FromString,
163
+ response_serializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesResponse.SerializeToString,
164
+ ),
165
+ 'PushObject': grpc.unary_unary_rpc_method_handler(
166
+ servicer.PushObject,
167
+ request_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.FromString,
168
+ response_serializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.SerializeToString,
169
+ ),
170
+ 'PullObject': grpc.unary_unary_rpc_method_handler(
171
+ servicer.PullObject,
172
+ request_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.FromString,
173
+ response_serializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.SerializeToString,
174
+ ),
175
+ 'ConfirmMessageReceived': grpc.unary_unary_rpc_method_handler(
176
+ servicer.ConfirmMessageReceived,
177
+ request_deserializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.FromString,
178
+ response_serializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.SerializeToString,
126
179
  ),
127
180
  }
128
181
  generic_handler = grpc.method_handlers_generic_handler(
@@ -180,8 +233,8 @@ class ClientAppIo(object):
180
233
  timeout=None,
181
234
  metadata=None):
182
235
  return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PullClientAppInputs',
183
- flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
184
- flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
236
+ flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
237
+ flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
185
238
  options, channel_credentials,
186
239
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
187
240
 
@@ -197,8 +250,8 @@ class ClientAppIo(object):
197
250
  timeout=None,
198
251
  metadata=None):
199
252
  return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PushClientAppOutputs',
200
- flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
201
- flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
253
+ flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
254
+ flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
202
255
  options, channel_credentials,
203
256
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
204
257
 
@@ -214,8 +267,8 @@ class ClientAppIo(object):
214
267
  timeout=None,
215
268
  metadata=None):
216
269
  return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PushMessage',
217
- flwr_dot_proto_dot_clientappio__pb2.PushMessageRequest.SerializeToString,
218
- flwr_dot_proto_dot_clientappio__pb2.PushMessageResponse.FromString,
270
+ flwr_dot_proto_dot_appio__pb2.PushAppMessagesRequest.SerializeToString,
271
+ flwr_dot_proto_dot_appio__pb2.PushAppMessagesResponse.FromString,
219
272
  options, channel_credentials,
220
273
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
221
274
 
@@ -231,7 +284,58 @@ class ClientAppIo(object):
231
284
  timeout=None,
232
285
  metadata=None):
233
286
  return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PullMessage',
234
- flwr_dot_proto_dot_clientappio__pb2.PullMessageRequest.SerializeToString,
235
- flwr_dot_proto_dot_clientappio__pb2.PullMessageResponse.FromString,
287
+ flwr_dot_proto_dot_appio__pb2.PullAppMessagesRequest.SerializeToString,
288
+ flwr_dot_proto_dot_appio__pb2.PullAppMessagesResponse.FromString,
289
+ options, channel_credentials,
290
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
291
+
292
+ @staticmethod
293
+ def PushObject(request,
294
+ target,
295
+ options=(),
296
+ channel_credentials=None,
297
+ call_credentials=None,
298
+ insecure=False,
299
+ compression=None,
300
+ wait_for_ready=None,
301
+ timeout=None,
302
+ metadata=None):
303
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PushObject',
304
+ flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
305
+ flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
306
+ options, channel_credentials,
307
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
308
+
309
+ @staticmethod
310
+ def PullObject(request,
311
+ target,
312
+ options=(),
313
+ channel_credentials=None,
314
+ call_credentials=None,
315
+ insecure=False,
316
+ compression=None,
317
+ wait_for_ready=None,
318
+ timeout=None,
319
+ metadata=None):
320
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PullObject',
321
+ flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
322
+ flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
323
+ options, channel_credentials,
324
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
325
+
326
+ @staticmethod
327
+ def ConfirmMessageReceived(request,
328
+ target,
329
+ options=(),
330
+ channel_credentials=None,
331
+ call_credentials=None,
332
+ insecure=False,
333
+ compression=None,
334
+ wait_for_ready=None,
335
+ timeout=None,
336
+ metadata=None):
337
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/ConfirmMessageReceived',
338
+ flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.SerializeToString,
339
+ flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.FromString,
236
340
  options, channel_credentials,
237
341
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -3,7 +3,9 @@
3
3
  isort:skip_file
4
4
  """
5
5
  import abc
6
+ import flwr.proto.appio_pb2
6
7
  import flwr.proto.clientappio_pb2
8
+ import flwr.proto.message_pb2
7
9
  import grpc
8
10
 
9
11
  class ClientAppIoStub:
@@ -19,25 +21,40 @@ class ClientAppIoStub:
19
21
  """Request token"""
20
22
 
21
23
  PullClientAppInputs: grpc.UnaryUnaryMultiCallable[
22
- flwr.proto.clientappio_pb2.PullClientAppInputsRequest,
23
- flwr.proto.clientappio_pb2.PullClientAppInputsResponse]
24
+ flwr.proto.appio_pb2.PullAppInputsRequest,
25
+ flwr.proto.appio_pb2.PullAppInputsResponse]
24
26
  """Pull client app inputs"""
25
27
 
26
28
  PushClientAppOutputs: grpc.UnaryUnaryMultiCallable[
27
- flwr.proto.clientappio_pb2.PushClientAppOutputsRequest,
28
- flwr.proto.clientappio_pb2.PushClientAppOutputsResponse]
29
+ flwr.proto.appio_pb2.PushAppOutputsRequest,
30
+ flwr.proto.appio_pb2.PushAppOutputsResponse]
29
31
  """Push client app outputs"""
30
32
 
31
33
  PushMessage: grpc.UnaryUnaryMultiCallable[
32
- flwr.proto.clientappio_pb2.PushMessageRequest,
33
- flwr.proto.clientappio_pb2.PushMessageResponse]
34
+ flwr.proto.appio_pb2.PushAppMessagesRequest,
35
+ flwr.proto.appio_pb2.PushAppMessagesResponse]
34
36
  """Push Message"""
35
37
 
36
38
  PullMessage: grpc.UnaryUnaryMultiCallable[
37
- flwr.proto.clientappio_pb2.PullMessageRequest,
38
- flwr.proto.clientappio_pb2.PullMessageResponse]
39
+ flwr.proto.appio_pb2.PullAppMessagesRequest,
40
+ flwr.proto.appio_pb2.PullAppMessagesResponse]
39
41
  """Pull Message"""
40
42
 
43
+ PushObject: grpc.UnaryUnaryMultiCallable[
44
+ flwr.proto.message_pb2.PushObjectRequest,
45
+ flwr.proto.message_pb2.PushObjectResponse]
46
+ """Push Object"""
47
+
48
+ PullObject: grpc.UnaryUnaryMultiCallable[
49
+ flwr.proto.message_pb2.PullObjectRequest,
50
+ flwr.proto.message_pb2.PullObjectResponse]
51
+ """Pull Object"""
52
+
53
+ ConfirmMessageReceived: grpc.UnaryUnaryMultiCallable[
54
+ flwr.proto.message_pb2.ConfirmMessageReceivedRequest,
55
+ flwr.proto.message_pb2.ConfirmMessageReceivedResponse]
56
+ """Confirm Message Received"""
57
+
41
58
 
42
59
  class ClientAppIoServicer(metaclass=abc.ABCMeta):
43
60
  @abc.abstractmethod
@@ -58,35 +75,59 @@ class ClientAppIoServicer(metaclass=abc.ABCMeta):
58
75
 
59
76
  @abc.abstractmethod
60
77
  def PullClientAppInputs(self,
61
- request: flwr.proto.clientappio_pb2.PullClientAppInputsRequest,
78
+ request: flwr.proto.appio_pb2.PullAppInputsRequest,
62
79
  context: grpc.ServicerContext,
63
- ) -> flwr.proto.clientappio_pb2.PullClientAppInputsResponse:
80
+ ) -> flwr.proto.appio_pb2.PullAppInputsResponse:
64
81
  """Pull client app inputs"""
65
82
  pass
66
83
 
67
84
  @abc.abstractmethod
68
85
  def PushClientAppOutputs(self,
69
- request: flwr.proto.clientappio_pb2.PushClientAppOutputsRequest,
86
+ request: flwr.proto.appio_pb2.PushAppOutputsRequest,
70
87
  context: grpc.ServicerContext,
71
- ) -> flwr.proto.clientappio_pb2.PushClientAppOutputsResponse:
88
+ ) -> flwr.proto.appio_pb2.PushAppOutputsResponse:
72
89
  """Push client app outputs"""
73
90
  pass
74
91
 
75
92
  @abc.abstractmethod
76
93
  def PushMessage(self,
77
- request: flwr.proto.clientappio_pb2.PushMessageRequest,
94
+ request: flwr.proto.appio_pb2.PushAppMessagesRequest,
78
95
  context: grpc.ServicerContext,
79
- ) -> flwr.proto.clientappio_pb2.PushMessageResponse:
96
+ ) -> flwr.proto.appio_pb2.PushAppMessagesResponse:
80
97
  """Push Message"""
81
98
  pass
82
99
 
83
100
  @abc.abstractmethod
84
101
  def PullMessage(self,
85
- request: flwr.proto.clientappio_pb2.PullMessageRequest,
102
+ request: flwr.proto.appio_pb2.PullAppMessagesRequest,
86
103
  context: grpc.ServicerContext,
87
- ) -> flwr.proto.clientappio_pb2.PullMessageResponse:
104
+ ) -> flwr.proto.appio_pb2.PullAppMessagesResponse:
88
105
  """Pull Message"""
89
106
  pass
90
107
 
108
+ @abc.abstractmethod
109
+ def PushObject(self,
110
+ request: flwr.proto.message_pb2.PushObjectRequest,
111
+ context: grpc.ServicerContext,
112
+ ) -> flwr.proto.message_pb2.PushObjectResponse:
113
+ """Push Object"""
114
+ pass
115
+
116
+ @abc.abstractmethod
117
+ def PullObject(self,
118
+ request: flwr.proto.message_pb2.PullObjectRequest,
119
+ context: grpc.ServicerContext,
120
+ ) -> flwr.proto.message_pb2.PullObjectResponse:
121
+ """Pull Object"""
122
+ pass
123
+
124
+ @abc.abstractmethod
125
+ def ConfirmMessageReceived(self,
126
+ request: flwr.proto.message_pb2.ConfirmMessageReceivedRequest,
127
+ context: grpc.ServicerContext,
128
+ ) -> flwr.proto.message_pb2.ConfirmMessageReceivedResponse:
129
+ """Confirm Message Received"""
130
+ pass
131
+
91
132
 
92
133
  def add_ClientAppIoServicer_to_server(servicer: ClientAppIoServicer, server: grpc.Server) -> None: ...
@@ -41,6 +41,10 @@ class FleetEventLogInterceptor(grpc.ServerInterceptor): # type: ignore
41
41
  if event logger is enabled on the SuperLink, else, terminate RPC call by setting
42
42
  context to abort.
43
43
  """
44
+ # Only apply to Fleet service
45
+ if not handler_call_details.method.startswith("/flwr.proto.Fleet/"):
46
+ return continuation(handler_call_details)
47
+
44
48
  # One of the method handlers in
45
49
  # `flwr.server.superlink.fleet.grpc_rere.fleet_servicer.FleetServicer`
46
50
  method_handler: grpc.RpcMethodHandler = continuation(handler_call_details)
@@ -31,11 +31,12 @@ from flwr.common.grpc import create_channel, on_channel_state_change
31
31
  from flwr.common.inflatable import (
32
32
  get_all_nested_objects,
33
33
  get_object_tree,
34
+ iterate_object_tree,
34
35
  no_object_id_recompute,
35
36
  )
36
- from flwr.common.inflatable_grpc_utils import (
37
- make_pull_object_fn_grpc,
38
- make_push_object_fn_grpc,
37
+ from flwr.common.inflatable_protobuf_utils import (
38
+ make_pull_object_fn_protobuf,
39
+ make_push_object_fn_protobuf,
39
40
  )
40
41
  from flwr.common.inflatable_utils import (
41
42
  inflate_object_from_contents,
@@ -240,8 +241,8 @@ class GrpcGrid(Grid):
240
241
  # Push only object that are not in the store
241
242
  push_objects(
242
243
  all_objects,
243
- push_object_fn=make_push_object_fn_grpc(
244
- push_object_grpc=self._stub.PushObject,
244
+ push_object_fn=make_push_object_fn_protobuf(
245
+ push_object_protobuf=self._stub.PushObject,
245
246
  node=self.node,
246
247
  run_id=run_id,
247
248
  ),
@@ -304,12 +305,14 @@ class GrpcGrid(Grid):
304
305
  )
305
306
  # Pull Messages from store
306
307
  inflated_msgs: list[Message] = []
307
- for msg_proto in res.messages_list:
308
+ for msg_proto, msg_tree in zip(res.messages_list, res.message_object_trees):
308
309
  msg_id = msg_proto.metadata.message_id
309
310
  all_object_contents = pull_objects(
310
- list(res.objects_to_pull[msg_id].object_ids) + [msg_id],
311
- pull_object_fn=make_pull_object_fn_grpc(
312
- pull_object_grpc=self._stub.PullObject,
311
+ object_ids=[
312
+ tree.object_id for tree in iterate_object_tree(msg_tree)
313
+ ],
314
+ pull_object_fn=make_pull_object_fn_protobuf(
315
+ pull_object_protobuf=self._stub.PullObject,
313
316
  node=self.node,
314
317
  run_id=run_id,
315
318
  ),
@@ -81,12 +81,9 @@ class AuthenticateServerInterceptor(grpc.ServerInterceptor): # type: ignore
81
81
  metadata sent by the node. Continue RPC call if node is authenticated, else,
82
82
  terminate RPC call by setting context to abort.
83
83
  """
84
- # Filter out non-Fleet service calls
84
+ # Only apply to Fleet service
85
85
  if not handler_call_details.method.startswith("/flwr.proto.Fleet/"):
86
- return _unary_unary_rpc_terminator(
87
- "This request should be sent to a different service.",
88
- grpc.StatusCode.FAILED_PRECONDITION,
89
- )
86
+ return continuation(handler_call_details)
90
87
 
91
88
  state = self.state_factory.state()
92
89
  metadata_dict = dict(handler_call_details.invocation_metadata)
@@ -27,7 +27,6 @@ from flwr.common.inflatable import (
27
27
  UnexpectedObjectContentError,
28
28
  get_all_nested_objects,
29
29
  get_object_tree,
30
- iterate_object_tree,
31
30
  no_object_id_recompute,
32
31
  )
33
32
  from flwr.common.logger import log
@@ -65,7 +64,6 @@ from flwr.proto.log_pb2 import ( # pylint: disable=E0611
65
64
  from flwr.proto.message_pb2 import ( # pylint: disable=E0611
66
65
  ConfirmMessageReceivedRequest,
67
66
  ConfirmMessageReceivedResponse,
68
- ObjectIDs,
69
67
  PullObjectRequest,
70
68
  PullObjectResponse,
71
69
  PushObjectRequest,
@@ -227,7 +225,7 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
227
225
 
228
226
  # Convert Messages to proto
229
227
  messages_list = []
230
- objects_to_pull: dict[str, ObjectIDs] = {}
228
+ trees = []
231
229
  while messages_res:
232
230
  msg = messages_res.pop(0)
233
231
 
@@ -238,22 +236,20 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
238
236
  request_name="PullMessages",
239
237
  detail="`message.metadata` has mismatched `run_id`",
240
238
  )
241
- messages_list.append(message_to_proto(msg))
242
239
 
243
240
  try:
244
241
  msg_object_id = msg.metadata.message_id
245
242
  obj_tree = store.get_object_tree(msg_object_id)
246
- descendants = [node.object_id for node in iterate_object_tree(obj_tree)]
247
- descendants = descendants[:-1] # Exclude the message itself
248
- # Add mapping of message object ID to its descendants
249
- objects_to_pull[msg_object_id] = ObjectIDs(object_ids=descendants)
243
+ # Add message and object tree to the response
244
+ messages_list.append(message_to_proto(msg))
245
+ trees.append(obj_tree)
250
246
  except NoObjectInStoreError as e:
251
247
  log(ERROR, e.message)
252
248
  # Delete message ins from state
253
249
  state.delete_messages(message_ins_ids={msg_object_id})
254
250
 
255
251
  return PullAppMessagesResponse(
256
- messages_list=messages_list, objects_to_pull=objects_to_pull
252
+ messages_list=messages_list, message_object_trees=trees
257
253
  )
258
254
 
259
255
  def GetRun(
@@ -44,6 +44,10 @@ class ExecEventLogInterceptor(grpc.ServerInterceptor): # type: ignore
44
44
  Continue RPC call if event logger is enabled on the SuperLink, else, terminate
45
45
  RPC call by setting context to abort.
46
46
  """
47
+ # Only apply to Exec service
48
+ if not handler_call_details.method.startswith("/flwr.proto.Exec/"):
49
+ return continuation(handler_call_details)
50
+
47
51
  # One of the method handlers in
48
52
  # `flwr.superexec.exec_servicer.ExecServicer`
49
53
  method_handler: grpc.RpcMethodHandler = continuation(handler_call_details)
@@ -42,6 +42,10 @@ class ExecLicenseInterceptor(grpc.ServerInterceptor): # type: ignore
42
42
  Continue RPC call if license check is enabled and passes, else, terminate RPC
43
43
  call by setting context to abort.
44
44
  """
45
+ # Only apply to Exec service
46
+ if not handler_call_details.method.startswith("/flwr.proto.Exec/"):
47
+ return continuation(handler_call_details)
48
+
45
49
  # One of the method handlers in
46
50
  # `flwr.superexec.exec_servicer.ExecServicer`
47
51
  method_handler: grpc.RpcMethodHandler = continuation(handler_call_details)