flwr-nightly 1.20.0.dev20250712__py3-none-any.whl → 1.20.0.dev20250715__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/client/grpc_rere_client/connection.py +3 -1
- flwr/client/rest_client/connection.py +3 -1
- flwr/common/grpc.py +12 -1
- flwr/common/inflatable_utils.py +14 -7
- flwr/proto/appio_pb2.py +51 -0
- flwr/proto/appio_pb2.pyi +167 -0
- flwr/proto/appio_pb2_grpc.py +4 -0
- flwr/proto/appio_pb2_grpc.pyi +4 -0
- flwr/proto/clientappio_pb2.py +19 -11
- flwr/proto/clientappio_pb2.pyi +50 -12
- flwr/proto/clientappio_pb2_grpc.py +68 -0
- flwr/proto/clientappio_pb2_grpc.pyi +26 -0
- flwr/proto/fleet_pb2.py +14 -18
- flwr/proto/fleet_pb2.pyi +4 -19
- flwr/proto/serverappio_pb2.py +8 -31
- flwr/proto/serverappio_pb2.pyi +0 -152
- flwr/proto/serverappio_pb2_grpc.py +39 -38
- flwr/proto/serverappio_pb2_grpc.pyi +21 -20
- flwr/server/grid/grpc_grid.py +10 -8
- flwr/server/serverapp/app.py +9 -11
- flwr/server/superlink/fleet/message_handler/message_handler.py +8 -13
- flwr/server/superlink/serverappio/serverappio_servicer.py +31 -33
- flwr/server/superlink/utils.py +3 -11
- flwr/supercore/grpc_health/__init__.py +22 -0
- flwr/supercore/grpc_health/simple_health_servicer.py +38 -0
- flwr/supercore/object_store/in_memory_object_store.py +31 -31
- flwr/supercore/object_store/object_store.py +16 -40
- flwr/supernode/runtime/run_clientapp.py +14 -4
- flwr/supernode/servicer/clientappio/clientappio_servicer.py +48 -5
- flwr/supernode/start_client_internal.py +14 -0
- {flwr_nightly-1.20.0.dev20250712.dist-info → flwr_nightly-1.20.0.dev20250715.dist-info}/METADATA +2 -1
- {flwr_nightly-1.20.0.dev20250712.dist-info → flwr_nightly-1.20.0.dev20250715.dist-info}/RECORD +34 -28
- {flwr_nightly-1.20.0.dev20250712.dist-info → flwr_nightly-1.20.0.dev20250715.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.20.0.dev20250712.dist-info → flwr_nightly-1.20.0.dev20250715.dist-info}/entry_points.txt +0 -0
@@ -31,6 +31,7 @@ from flwr.common.heartbeat import HeartbeatSender
|
|
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
37
|
from flwr.common.inflatable_grpc_utils import (
|
@@ -273,8 +274,9 @@ def grpc_request_response( # pylint: disable=R0913,R0914,R0915,R0917
|
|
273
274
|
if message_proto:
|
274
275
|
msg_id = message_proto.metadata.message_id
|
275
276
|
run_id = message_proto.metadata.run_id
|
277
|
+
object_tree = response.message_object_trees[0]
|
276
278
|
all_object_contents = pull_objects(
|
277
|
-
|
279
|
+
[tree.object_id for tree in iterate_object_tree(object_tree)],
|
278
280
|
pull_object_fn=make_pull_object_fn_grpc(
|
279
281
|
pull_object_grpc=stub.PullObject,
|
280
282
|
node=node,
|
@@ -30,6 +30,7 @@ from flwr.common.heartbeat import HeartbeatSender
|
|
30
30
|
from flwr.common.inflatable import (
|
31
31
|
get_all_nested_objects,
|
32
32
|
get_object_tree,
|
33
|
+
iterate_object_tree,
|
33
34
|
no_object_id_recompute,
|
34
35
|
)
|
35
36
|
from flwr.common.inflatable_rest_utils import (
|
@@ -333,8 +334,9 @@ def http_request_response( # pylint: disable=R0913,R0914,R0915,R0917
|
|
333
334
|
return res
|
334
335
|
|
335
336
|
try:
|
337
|
+
object_tree = res.message_object_trees[0]
|
336
338
|
all_object_contents = pull_objects(
|
337
|
-
|
339
|
+
[tree.object_id for tree in iterate_object_tree(object_tree)],
|
338
340
|
pull_object_fn=make_pull_object_fn_rest(
|
339
341
|
pull_object_rest=fn,
|
340
342
|
node=node,
|
flwr/common/grpc.py
CHANGED
@@ -23,6 +23,9 @@ from logging import DEBUG, ERROR
|
|
23
23
|
from typing import Any, Callable, Optional
|
24
24
|
|
25
25
|
import grpc
|
26
|
+
from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server
|
27
|
+
|
28
|
+
from flwr.supercore.grpc_health import SimpleHealthServicer
|
26
29
|
|
27
30
|
from .address import is_port_in_use
|
28
31
|
from .logger import log
|
@@ -98,7 +101,7 @@ def valid_certificates(certificates: tuple[bytes, bytes, bytes]) -> bool:
|
|
98
101
|
return is_valid
|
99
102
|
|
100
103
|
|
101
|
-
def generic_create_grpc_server( # pylint: disable=too-many-arguments,R0917
|
104
|
+
def generic_create_grpc_server( # pylint: disable=too-many-arguments, R0914, R0917
|
102
105
|
servicer_and_add_fn: tuple[Any, AddServicerToServerFn],
|
103
106
|
server_address: str,
|
104
107
|
max_concurrent_workers: int = 1000,
|
@@ -106,6 +109,7 @@ def generic_create_grpc_server( # pylint: disable=too-many-arguments,R0917
|
|
106
109
|
keepalive_time_ms: int = 210000,
|
107
110
|
certificates: Optional[tuple[bytes, bytes, bytes]] = None,
|
108
111
|
interceptors: Optional[Sequence[grpc.ServerInterceptor]] = None,
|
112
|
+
health_servicer: Optional[Any] = None,
|
109
113
|
) -> grpc.Server:
|
110
114
|
"""Create a gRPC server with a single servicer.
|
111
115
|
|
@@ -153,6 +157,10 @@ def generic_create_grpc_server( # pylint: disable=too-many-arguments,R0917
|
|
153
157
|
* server private key.
|
154
158
|
interceptors : Optional[Sequence[grpc.ServerInterceptor]] (default: None)
|
155
159
|
A list of gRPC interceptors.
|
160
|
+
health_servicer : Optional[Any] (default: None)
|
161
|
+
An optional health servicer to add to the server. If provided, it should be an
|
162
|
+
instance of a class that inherits the `HealthServicer` class.
|
163
|
+
If None is provided, `SimpleHealthServicer` will be used by default.
|
156
164
|
|
157
165
|
Returns
|
158
166
|
-------
|
@@ -203,6 +211,9 @@ def generic_create_grpc_server( # pylint: disable=too-many-arguments,R0917
|
|
203
211
|
)
|
204
212
|
add_servicer_to_server_fn(servicer, server)
|
205
213
|
|
214
|
+
# Enable health service
|
215
|
+
add_HealthServicer_to_server(health_servicer or SimpleHealthServicer(), server)
|
216
|
+
|
206
217
|
if certificates is not None:
|
207
218
|
if not valid_certificates(certificates):
|
208
219
|
sys.exit(1)
|
flwr/common/inflatable_utils.py
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
"""InflatableObject utilities."""
|
16
16
|
|
17
17
|
import concurrent.futures
|
18
|
+
import os
|
18
19
|
import random
|
19
20
|
import threading
|
20
21
|
import time
|
@@ -69,6 +70,13 @@ class ObjectIdNotPreregisteredError(Exception):
|
|
69
70
|
super().__init__(f"Object with ID '{object_id}' could not be found.")
|
70
71
|
|
71
72
|
|
73
|
+
def get_num_workers(max_concurrent: int) -> int:
|
74
|
+
"""Get number of workers based on the number of CPU cores and the maximum
|
75
|
+
allowed."""
|
76
|
+
num_cores = os.cpu_count() or 1
|
77
|
+
return min(max_concurrent, num_cores)
|
78
|
+
|
79
|
+
|
72
80
|
def push_objects(
|
73
81
|
objects: dict[str, InflatableObject],
|
74
82
|
push_object_fn: Callable[[str, bytes], None],
|
@@ -111,13 +119,13 @@ def push_objects(
|
|
111
119
|
del objects[obj_id]
|
112
120
|
push_object_fn(obj_id, object_content)
|
113
121
|
|
114
|
-
|
115
|
-
|
116
|
-
) as executor:
|
122
|
+
# Push all objects concurrently
|
123
|
+
num_workers = get_num_workers(max_concurrent_pushes)
|
124
|
+
with concurrent.futures.ThreadPoolExecutor(max_workers=num_workers) as executor:
|
117
125
|
list(executor.map(push, list(objects.keys())))
|
118
126
|
|
119
127
|
|
120
|
-
def pull_objects( # pylint: disable=too-many-arguments
|
128
|
+
def pull_objects( # pylint: disable=too-many-arguments,too-many-locals
|
121
129
|
object_ids: list[str],
|
122
130
|
pull_object_fn: Callable[[str], bytes],
|
123
131
|
*,
|
@@ -209,9 +217,8 @@ def pull_objects( # pylint: disable=too-many-arguments
|
|
209
217
|
return
|
210
218
|
|
211
219
|
# Submit all pull tasks concurrently
|
212
|
-
|
213
|
-
|
214
|
-
) as executor:
|
220
|
+
num_workers = get_num_workers(max_concurrent_pulls)
|
221
|
+
with concurrent.futures.ThreadPoolExecutor(max_workers=num_workers) as executor:
|
215
222
|
futures = {
|
216
223
|
executor.submit(pull_with_retries, obj_id): obj_id for obj_id in object_ids
|
217
224
|
}
|
flwr/proto/appio_pb2.py
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: flwr/proto/appio.proto
|
4
|
+
# Protobuf Python Version: 4.25.1
|
5
|
+
"""Generated protocol buffer code."""
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
from google.protobuf.internal import builder as _builder
|
10
|
+
# @@protoc_insertion_point(imports)
|
11
|
+
|
12
|
+
_sym_db = _symbol_database.Default()
|
13
|
+
|
14
|
+
|
15
|
+
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
16
|
+
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
17
|
+
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
18
|
+
|
19
|
+
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/appio.proto\x12\nflwr.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\"\x8a\x01\n\x16PushAppMessagesRequest\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\x17PushAppMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12O\n\x0fobjects_to_push\x18\x02 \x03(\x0b\x32\x36.flwr.proto.PushAppMessagesResponse.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\x16PullAppMessagesRequest\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\"\xe3\x01\n\x17PullAppMessagesResponse\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.PullAppMessagesResponse.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\"\x16\n\x14PullAppInputsRequest\"y\n\x15PullAppInputsResponse\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\"M\n\x15PushAppOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x18\n\x16PushAppOutputsResponseb\x06proto3')
|
21
|
+
|
22
|
+
_globals = globals()
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.appio_pb2', _globals)
|
25
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
26
|
+
DESCRIPTOR._options = None
|
27
|
+
_globals['_PUSHAPPMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._options = None
|
28
|
+
_globals['_PUSHAPPMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._serialized_options = b'8\001'
|
29
|
+
_globals['_PULLAPPMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._options = None
|
30
|
+
_globals['_PULLAPPMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._serialized_options = b'8\001'
|
31
|
+
_globals['_PUSHAPPMESSAGESREQUEST']._serialized_start=109
|
32
|
+
_globals['_PUSHAPPMESSAGESREQUEST']._serialized_end=247
|
33
|
+
_globals['_PUSHAPPMESSAGESRESPONSE']._serialized_start=250
|
34
|
+
_globals['_PUSHAPPMESSAGESRESPONSE']._serialized_end=454
|
35
|
+
_globals['_PUSHAPPMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._serialized_start=379
|
36
|
+
_globals['_PUSHAPPMESSAGESRESPONSE_OBJECTSTOPUSHENTRY']._serialized_end=454
|
37
|
+
_globals['_PULLAPPMESSAGESREQUEST']._serialized_start=456
|
38
|
+
_globals['_PULLAPPMESSAGESREQUEST']._serialized_end=517
|
39
|
+
_globals['_PULLAPPMESSAGESRESPONSE']._serialized_start=520
|
40
|
+
_globals['_PULLAPPMESSAGESRESPONSE']._serialized_end=747
|
41
|
+
_globals['_PULLAPPMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._serialized_start=672
|
42
|
+
_globals['_PULLAPPMESSAGESRESPONSE_OBJECTSTOPULLENTRY']._serialized_end=747
|
43
|
+
_globals['_PULLAPPINPUTSREQUEST']._serialized_start=749
|
44
|
+
_globals['_PULLAPPINPUTSREQUEST']._serialized_end=771
|
45
|
+
_globals['_PULLAPPINPUTSRESPONSE']._serialized_start=773
|
46
|
+
_globals['_PULLAPPINPUTSRESPONSE']._serialized_end=894
|
47
|
+
_globals['_PUSHAPPOUTPUTSREQUEST']._serialized_start=896
|
48
|
+
_globals['_PUSHAPPOUTPUTSREQUEST']._serialized_end=973
|
49
|
+
_globals['_PUSHAPPOUTPUTSRESPONSE']._serialized_start=975
|
50
|
+
_globals['_PUSHAPPOUTPUTSRESPONSE']._serialized_end=999
|
51
|
+
# @@protoc_insertion_point(module_scope)
|
flwr/proto/appio_pb2.pyi
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
"""
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
3
|
+
isort:skip_file
|
4
|
+
"""
|
5
|
+
import builtins
|
6
|
+
import flwr.proto.fab_pb2
|
7
|
+
import flwr.proto.message_pb2
|
8
|
+
import flwr.proto.run_pb2
|
9
|
+
import google.protobuf.descriptor
|
10
|
+
import google.protobuf.internal.containers
|
11
|
+
import google.protobuf.message
|
12
|
+
import typing
|
13
|
+
import typing_extensions
|
14
|
+
|
15
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
16
|
+
|
17
|
+
class PushAppMessagesRequest(google.protobuf.message.Message):
|
18
|
+
"""These messages are used by both ServerAppIo and ClientAppIo services
|
19
|
+
|
20
|
+
PushAppMessages messages
|
21
|
+
"""
|
22
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
23
|
+
MESSAGES_LIST_FIELD_NUMBER: builtins.int
|
24
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
25
|
+
MESSAGE_OBJECT_TREES_FIELD_NUMBER: builtins.int
|
26
|
+
@property
|
27
|
+
def messages_list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.Message]: ...
|
28
|
+
run_id: builtins.int
|
29
|
+
@property
|
30
|
+
def message_object_trees(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.ObjectTree]: ...
|
31
|
+
def __init__(self,
|
32
|
+
*,
|
33
|
+
messages_list: typing.Optional[typing.Iterable[flwr.proto.message_pb2.Message]] = ...,
|
34
|
+
run_id: builtins.int = ...,
|
35
|
+
message_object_trees: typing.Optional[typing.Iterable[flwr.proto.message_pb2.ObjectTree]] = ...,
|
36
|
+
) -> None: ...
|
37
|
+
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: ...
|
38
|
+
global___PushAppMessagesRequest = PushAppMessagesRequest
|
39
|
+
|
40
|
+
class PushAppMessagesResponse(google.protobuf.message.Message):
|
41
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
42
|
+
class ObjectsToPushEntry(google.protobuf.message.Message):
|
43
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
44
|
+
KEY_FIELD_NUMBER: builtins.int
|
45
|
+
VALUE_FIELD_NUMBER: builtins.int
|
46
|
+
key: typing.Text
|
47
|
+
@property
|
48
|
+
def value(self) -> flwr.proto.message_pb2.ObjectIDs: ...
|
49
|
+
def __init__(self,
|
50
|
+
*,
|
51
|
+
key: typing.Text = ...,
|
52
|
+
value: typing.Optional[flwr.proto.message_pb2.ObjectIDs] = ...,
|
53
|
+
) -> None: ...
|
54
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
55
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
56
|
+
|
57
|
+
MESSAGE_IDS_FIELD_NUMBER: builtins.int
|
58
|
+
OBJECTS_TO_PUSH_FIELD_NUMBER: builtins.int
|
59
|
+
@property
|
60
|
+
def message_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
|
61
|
+
@property
|
62
|
+
def objects_to_push(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.message_pb2.ObjectIDs]: ...
|
63
|
+
def __init__(self,
|
64
|
+
*,
|
65
|
+
message_ids: typing.Optional[typing.Iterable[typing.Text]] = ...,
|
66
|
+
objects_to_push: typing.Optional[typing.Mapping[typing.Text, flwr.proto.message_pb2.ObjectIDs]] = ...,
|
67
|
+
) -> None: ...
|
68
|
+
def ClearField(self, field_name: typing_extensions.Literal["message_ids",b"message_ids","objects_to_push",b"objects_to_push"]) -> None: ...
|
69
|
+
global___PushAppMessagesResponse = PushAppMessagesResponse
|
70
|
+
|
71
|
+
class PullAppMessagesRequest(google.protobuf.message.Message):
|
72
|
+
"""PullAppMessages messages"""
|
73
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
74
|
+
MESSAGE_IDS_FIELD_NUMBER: builtins.int
|
75
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
76
|
+
@property
|
77
|
+
def message_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
|
78
|
+
run_id: builtins.int
|
79
|
+
def __init__(self,
|
80
|
+
*,
|
81
|
+
message_ids: typing.Optional[typing.Iterable[typing.Text]] = ...,
|
82
|
+
run_id: builtins.int = ...,
|
83
|
+
) -> None: ...
|
84
|
+
def ClearField(self, field_name: typing_extensions.Literal["message_ids",b"message_ids","run_id",b"run_id"]) -> None: ...
|
85
|
+
global___PullAppMessagesRequest = PullAppMessagesRequest
|
86
|
+
|
87
|
+
class PullAppMessagesResponse(google.protobuf.message.Message):
|
88
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
89
|
+
class ObjectsToPullEntry(google.protobuf.message.Message):
|
90
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
91
|
+
KEY_FIELD_NUMBER: builtins.int
|
92
|
+
VALUE_FIELD_NUMBER: builtins.int
|
93
|
+
key: typing.Text
|
94
|
+
@property
|
95
|
+
def value(self) -> flwr.proto.message_pb2.ObjectIDs: ...
|
96
|
+
def __init__(self,
|
97
|
+
*,
|
98
|
+
key: typing.Text = ...,
|
99
|
+
value: typing.Optional[flwr.proto.message_pb2.ObjectIDs] = ...,
|
100
|
+
) -> None: ...
|
101
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
102
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
103
|
+
|
104
|
+
MESSAGES_LIST_FIELD_NUMBER: builtins.int
|
105
|
+
OBJECTS_TO_PULL_FIELD_NUMBER: builtins.int
|
106
|
+
@property
|
107
|
+
def messages_list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.Message]: ...
|
108
|
+
@property
|
109
|
+
def objects_to_pull(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.message_pb2.ObjectIDs]: ...
|
110
|
+
def __init__(self,
|
111
|
+
*,
|
112
|
+
messages_list: typing.Optional[typing.Iterable[flwr.proto.message_pb2.Message]] = ...,
|
113
|
+
objects_to_pull: typing.Optional[typing.Mapping[typing.Text, flwr.proto.message_pb2.ObjectIDs]] = ...,
|
114
|
+
) -> None: ...
|
115
|
+
def ClearField(self, field_name: typing_extensions.Literal["messages_list",b"messages_list","objects_to_pull",b"objects_to_pull"]) -> None: ...
|
116
|
+
global___PullAppMessagesResponse = PullAppMessagesResponse
|
117
|
+
|
118
|
+
class PullAppInputsRequest(google.protobuf.message.Message):
|
119
|
+
"""PullAppInputs messages"""
|
120
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
121
|
+
def __init__(self,
|
122
|
+
) -> None: ...
|
123
|
+
global___PullAppInputsRequest = PullAppInputsRequest
|
124
|
+
|
125
|
+
class PullAppInputsResponse(google.protobuf.message.Message):
|
126
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
127
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
128
|
+
RUN_FIELD_NUMBER: builtins.int
|
129
|
+
FAB_FIELD_NUMBER: builtins.int
|
130
|
+
@property
|
131
|
+
def context(self) -> flwr.proto.message_pb2.Context: ...
|
132
|
+
@property
|
133
|
+
def run(self) -> flwr.proto.run_pb2.Run: ...
|
134
|
+
@property
|
135
|
+
def fab(self) -> flwr.proto.fab_pb2.Fab: ...
|
136
|
+
def __init__(self,
|
137
|
+
*,
|
138
|
+
context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
|
139
|
+
run: typing.Optional[flwr.proto.run_pb2.Run] = ...,
|
140
|
+
fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
|
141
|
+
) -> None: ...
|
142
|
+
def HasField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> builtins.bool: ...
|
143
|
+
def ClearField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> None: ...
|
144
|
+
global___PullAppInputsResponse = PullAppInputsResponse
|
145
|
+
|
146
|
+
class PushAppOutputsRequest(google.protobuf.message.Message):
|
147
|
+
"""PushAppInputs messages"""
|
148
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
149
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
150
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
151
|
+
run_id: builtins.int
|
152
|
+
@property
|
153
|
+
def context(self) -> flwr.proto.message_pb2.Context: ...
|
154
|
+
def __init__(self,
|
155
|
+
*,
|
156
|
+
run_id: builtins.int = ...,
|
157
|
+
context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
|
158
|
+
) -> None: ...
|
159
|
+
def HasField(self, field_name: typing_extensions.Literal["context",b"context"]) -> builtins.bool: ...
|
160
|
+
def ClearField(self, field_name: typing_extensions.Literal["context",b"context","run_id",b"run_id"]) -> None: ...
|
161
|
+
global___PushAppOutputsRequest = PushAppOutputsRequest
|
162
|
+
|
163
|
+
class PushAppOutputsResponse(google.protobuf.message.Message):
|
164
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
165
|
+
def __init__(self,
|
166
|
+
) -> None: ...
|
167
|
+
global___PushAppOutputsResponse = PushAppOutputsResponse
|
flwr/proto/clientappio_pb2.py
CHANGED
@@ -17,15 +17,15 @@ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
17
17
|
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
18
18
|
|
19
19
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/clientappio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x18\x66lwr/proto/message.proto\"%\n#GetRunIdsWithPendingMessagesRequest\"7\n$GetRunIdsWithPendingMessagesResponse\x12\x0f\n\x07run_ids\x18\x01 \x03(\x04\"%\n\x13RequestTokenRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"%\n\x14RequestTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\"W\n\x15\x43lientAppOutputStatus\x12-\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x1f.flwr.proto.ClientAppOutputCode\x12\x0f\n\x07message\x18\x02 \x01(\t\"+\n\x1aPullClientAppInputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/clientappio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x18\x66lwr/proto/message.proto\"%\n#GetRunIdsWithPendingMessagesRequest\"7\n$GetRunIdsWithPendingMessagesResponse\x12\x0f\n\x07run_ids\x18\x01 \x03(\x04\"%\n\x13RequestTokenRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"%\n\x14RequestTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\"W\n\x15\x43lientAppOutputStatus\x12-\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x1f.flwr.proto.ClientAppOutputCode\x12\x0f\n\x07message\x18\x02 \x01(\t\"+\n\x1aPullClientAppInputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x7f\n\x1bPullClientAppInputsResponse\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\"R\n\x1bPushClientAppOutputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"Q\n\x1cPushClientAppOutputsResponse\x12\x31\n\x06status\x18\x01 \x01(\x0b\x32!.flwr.proto.ClientAppOutputStatus\"#\n\x12PullMessageRequest\x12\r\n\x05token\x18\x01 \x01(\t\";\n\x13PullMessageResponse\x12$\n\x07message\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Message\"I\n\x12PushMessageRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12$\n\x07message\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Message\"\x15\n\x13PushMessageResponse*L\n\x13\x43lientAppOutputCode\x12\x0b\n\x07SUCCESS\x10\x00\x12\x15\n\x11\x44\x45\x41\x44LINE_EXCEEDED\x10\x01\x12\x11\n\rUNKNOWN_ERROR\x10\x02\x32\xe3\x04\n\x0b\x43lientAppIo\x12\x83\x01\n\x1cGetRunIdsWithPendingMessages\x12/.flwr.proto.GetRunIdsWithPendingMessagesRequest\x1a\x30.flwr.proto.GetRunIdsWithPendingMessagesResponse\"\x00\x12S\n\x0cRequestToken\x12\x1f.flwr.proto.RequestTokenRequest\x1a .flwr.proto.RequestTokenResponse\"\x00\x12h\n\x13PullClientAppInputs\x12&.flwr.proto.PullClientAppInputsRequest\x1a\'.flwr.proto.PullClientAppInputsResponse\"\x00\x12k\n\x14PushClientAppOutputs\x12\'.flwr.proto.PushClientAppOutputsRequest\x1a(.flwr.proto.PushClientAppOutputsResponse\"\x00\x12P\n\x0bPushMessage\x12\x1e.flwr.proto.PushMessageRequest\x1a\x1f.flwr.proto.PushMessageResponse\"\x00\x12P\n\x0bPullMessage\x12\x1e.flwr.proto.PullMessageRequest\x1a\x1f.flwr.proto.PullMessageResponse\"\x00\x62\x06proto3')
|
21
21
|
|
22
22
|
_globals = globals()
|
23
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
24
24
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.clientappio_pb2', _globals)
|
25
25
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
26
26
|
DESCRIPTOR._options = None
|
27
|
-
_globals['_CLIENTAPPOUTPUTCODE']._serialized_start=
|
28
|
-
_globals['_CLIENTAPPOUTPUTCODE']._serialized_end=
|
27
|
+
_globals['_CLIENTAPPOUTPUTCODE']._serialized_start=914
|
28
|
+
_globals['_CLIENTAPPOUTPUTCODE']._serialized_end=990
|
29
29
|
_globals['_GETRUNIDSWITHPENDINGMESSAGESREQUEST']._serialized_start=114
|
30
30
|
_globals['_GETRUNIDSWITHPENDINGMESSAGESREQUEST']._serialized_end=151
|
31
31
|
_globals['_GETRUNIDSWITHPENDINGMESSAGESRESPONSE']._serialized_start=153
|
@@ -38,12 +38,20 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
38
38
|
_globals['_CLIENTAPPOUTPUTSTATUS']._serialized_end=375
|
39
39
|
_globals['_PULLCLIENTAPPINPUTSREQUEST']._serialized_start=377
|
40
40
|
_globals['_PULLCLIENTAPPINPUTSREQUEST']._serialized_end=420
|
41
|
-
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_start=
|
42
|
-
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_end=
|
43
|
-
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_start=
|
44
|
-
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_end=
|
45
|
-
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_start=
|
46
|
-
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_end=
|
47
|
-
_globals['
|
48
|
-
_globals['
|
41
|
+
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_start=422
|
42
|
+
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_end=549
|
43
|
+
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_start=551
|
44
|
+
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_end=633
|
45
|
+
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_start=635
|
46
|
+
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_end=716
|
47
|
+
_globals['_PULLMESSAGEREQUEST']._serialized_start=718
|
48
|
+
_globals['_PULLMESSAGEREQUEST']._serialized_end=753
|
49
|
+
_globals['_PULLMESSAGERESPONSE']._serialized_start=755
|
50
|
+
_globals['_PULLMESSAGERESPONSE']._serialized_end=814
|
51
|
+
_globals['_PUSHMESSAGEREQUEST']._serialized_start=816
|
52
|
+
_globals['_PUSHMESSAGEREQUEST']._serialized_end=889
|
53
|
+
_globals['_PUSHMESSAGERESPONSE']._serialized_start=891
|
54
|
+
_globals['_PUSHMESSAGERESPONSE']._serialized_end=912
|
55
|
+
_globals['_CLIENTAPPIO']._serialized_start=993
|
56
|
+
_globals['_CLIENTAPPIO']._serialized_end=1604
|
49
57
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/clientappio_pb2.pyi
CHANGED
@@ -101,13 +101,10 @@ global___PullClientAppInputsRequest = PullClientAppInputsRequest
|
|
101
101
|
|
102
102
|
class PullClientAppInputsResponse(google.protobuf.message.Message):
|
103
103
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
104
|
-
MESSAGE_FIELD_NUMBER: builtins.int
|
105
104
|
CONTEXT_FIELD_NUMBER: builtins.int
|
106
105
|
RUN_FIELD_NUMBER: builtins.int
|
107
106
|
FAB_FIELD_NUMBER: builtins.int
|
108
107
|
@property
|
109
|
-
def message(self) -> flwr.proto.message_pb2.Message: ...
|
110
|
-
@property
|
111
108
|
def context(self) -> flwr.proto.message_pb2.Context: ...
|
112
109
|
@property
|
113
110
|
def run(self) -> flwr.proto.run_pb2.Run: ...
|
@@ -115,33 +112,28 @@ class PullClientAppInputsResponse(google.protobuf.message.Message):
|
|
115
112
|
def fab(self) -> flwr.proto.fab_pb2.Fab: ...
|
116
113
|
def __init__(self,
|
117
114
|
*,
|
118
|
-
message: typing.Optional[flwr.proto.message_pb2.Message] = ...,
|
119
115
|
context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
|
120
116
|
run: typing.Optional[flwr.proto.run_pb2.Run] = ...,
|
121
117
|
fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
|
122
118
|
) -> None: ...
|
123
|
-
def HasField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","
|
124
|
-
def ClearField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","
|
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: ...
|
125
121
|
global___PullClientAppInputsResponse = PullClientAppInputsResponse
|
126
122
|
|
127
123
|
class PushClientAppOutputsRequest(google.protobuf.message.Message):
|
128
124
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
129
125
|
TOKEN_FIELD_NUMBER: builtins.int
|
130
|
-
MESSAGE_FIELD_NUMBER: builtins.int
|
131
126
|
CONTEXT_FIELD_NUMBER: builtins.int
|
132
127
|
token: typing.Text
|
133
128
|
@property
|
134
|
-
def message(self) -> flwr.proto.message_pb2.Message: ...
|
135
|
-
@property
|
136
129
|
def context(self) -> flwr.proto.message_pb2.Context: ...
|
137
130
|
def __init__(self,
|
138
131
|
*,
|
139
132
|
token: typing.Text = ...,
|
140
|
-
message: typing.Optional[flwr.proto.message_pb2.Message] = ...,
|
141
133
|
context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
|
142
134
|
) -> None: ...
|
143
|
-
def HasField(self, field_name: typing_extensions.Literal["context",b"context"
|
144
|
-
def ClearField(self, field_name: typing_extensions.Literal["context",b"context","
|
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: ...
|
145
137
|
global___PushClientAppOutputsRequest = PushClientAppOutputsRequest
|
146
138
|
|
147
139
|
class PushClientAppOutputsResponse(google.protobuf.message.Message):
|
@@ -156,3 +148,49 @@ class PushClientAppOutputsResponse(google.protobuf.message.Message):
|
|
156
148
|
def HasField(self, field_name: typing_extensions.Literal["status",b"status"]) -> builtins.bool: ...
|
157
149
|
def ClearField(self, field_name: typing_extensions.Literal["status",b"status"]) -> None: ...
|
158
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
|
@@ -34,6 +34,16 @@ class ClientAppIoStub(object):
|
|
34
34
|
request_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
|
35
35
|
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
|
36
36
|
)
|
37
|
+
self.PushMessage = channel.unary_unary(
|
38
|
+
'/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
|
+
)
|
42
|
+
self.PullMessage = channel.unary_unary(
|
43
|
+
'/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
|
+
)
|
37
47
|
|
38
48
|
|
39
49
|
class ClientAppIoServicer(object):
|
@@ -67,6 +77,20 @@ class ClientAppIoServicer(object):
|
|
67
77
|
context.set_details('Method not implemented!')
|
68
78
|
raise NotImplementedError('Method not implemented!')
|
69
79
|
|
80
|
+
def PushMessage(self, request, context):
|
81
|
+
"""Push Message
|
82
|
+
"""
|
83
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
84
|
+
context.set_details('Method not implemented!')
|
85
|
+
raise NotImplementedError('Method not implemented!')
|
86
|
+
|
87
|
+
def PullMessage(self, request, context):
|
88
|
+
"""Pull Message
|
89
|
+
"""
|
90
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
91
|
+
context.set_details('Method not implemented!')
|
92
|
+
raise NotImplementedError('Method not implemented!')
|
93
|
+
|
70
94
|
|
71
95
|
def add_ClientAppIoServicer_to_server(servicer, server):
|
72
96
|
rpc_method_handlers = {
|
@@ -90,6 +114,16 @@ def add_ClientAppIoServicer_to_server(servicer, server):
|
|
90
114
|
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.FromString,
|
91
115
|
response_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.SerializeToString,
|
92
116
|
),
|
117
|
+
'PushMessage': grpc.unary_unary_rpc_method_handler(
|
118
|
+
servicer.PushMessage,
|
119
|
+
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushMessageRequest.FromString,
|
120
|
+
response_serializer=flwr_dot_proto_dot_clientappio__pb2.PushMessageResponse.SerializeToString,
|
121
|
+
),
|
122
|
+
'PullMessage': grpc.unary_unary_rpc_method_handler(
|
123
|
+
servicer.PullMessage,
|
124
|
+
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullMessageRequest.FromString,
|
125
|
+
response_serializer=flwr_dot_proto_dot_clientappio__pb2.PullMessageResponse.SerializeToString,
|
126
|
+
),
|
93
127
|
}
|
94
128
|
generic_handler = grpc.method_handlers_generic_handler(
|
95
129
|
'flwr.proto.ClientAppIo', rpc_method_handlers)
|
@@ -167,3 +201,37 @@ class ClientAppIo(object):
|
|
167
201
|
flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
|
168
202
|
options, channel_credentials,
|
169
203
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
204
|
+
|
205
|
+
@staticmethod
|
206
|
+
def PushMessage(request,
|
207
|
+
target,
|
208
|
+
options=(),
|
209
|
+
channel_credentials=None,
|
210
|
+
call_credentials=None,
|
211
|
+
insecure=False,
|
212
|
+
compression=None,
|
213
|
+
wait_for_ready=None,
|
214
|
+
timeout=None,
|
215
|
+
metadata=None):
|
216
|
+
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,
|
219
|
+
options, channel_credentials,
|
220
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
221
|
+
|
222
|
+
@staticmethod
|
223
|
+
def PullMessage(request,
|
224
|
+
target,
|
225
|
+
options=(),
|
226
|
+
channel_credentials=None,
|
227
|
+
call_credentials=None,
|
228
|
+
insecure=False,
|
229
|
+
compression=None,
|
230
|
+
wait_for_ready=None,
|
231
|
+
timeout=None,
|
232
|
+
metadata=None):
|
233
|
+
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,
|
236
|
+
options, channel_credentials,
|
237
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
@@ -28,6 +28,16 @@ class ClientAppIoStub:
|
|
28
28
|
flwr.proto.clientappio_pb2.PushClientAppOutputsResponse]
|
29
29
|
"""Push client app outputs"""
|
30
30
|
|
31
|
+
PushMessage: grpc.UnaryUnaryMultiCallable[
|
32
|
+
flwr.proto.clientappio_pb2.PushMessageRequest,
|
33
|
+
flwr.proto.clientappio_pb2.PushMessageResponse]
|
34
|
+
"""Push Message"""
|
35
|
+
|
36
|
+
PullMessage: grpc.UnaryUnaryMultiCallable[
|
37
|
+
flwr.proto.clientappio_pb2.PullMessageRequest,
|
38
|
+
flwr.proto.clientappio_pb2.PullMessageResponse]
|
39
|
+
"""Pull Message"""
|
40
|
+
|
31
41
|
|
32
42
|
class ClientAppIoServicer(metaclass=abc.ABCMeta):
|
33
43
|
@abc.abstractmethod
|
@@ -62,5 +72,21 @@ class ClientAppIoServicer(metaclass=abc.ABCMeta):
|
|
62
72
|
"""Push client app outputs"""
|
63
73
|
pass
|
64
74
|
|
75
|
+
@abc.abstractmethod
|
76
|
+
def PushMessage(self,
|
77
|
+
request: flwr.proto.clientappio_pb2.PushMessageRequest,
|
78
|
+
context: grpc.ServicerContext,
|
79
|
+
) -> flwr.proto.clientappio_pb2.PushMessageResponse:
|
80
|
+
"""Push Message"""
|
81
|
+
pass
|
82
|
+
|
83
|
+
@abc.abstractmethod
|
84
|
+
def PullMessage(self,
|
85
|
+
request: flwr.proto.clientappio_pb2.PullMessageRequest,
|
86
|
+
context: grpc.ServicerContext,
|
87
|
+
) -> flwr.proto.clientappio_pb2.PullMessageResponse:
|
88
|
+
"""Pull Message"""
|
89
|
+
pass
|
90
|
+
|
65
91
|
|
66
92
|
def add_ClientAppIoServicer_to_server(servicer: ClientAppIoServicer, server: grpc.Server) -> None: ...
|