flwr-nightly 1.13.0.dev20241021__py3-none-any.whl → 1.13.0.dev20241111__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.

Potentially problematic release.


This version of flwr-nightly might be problematic. Click here for more details.

Files changed (92) hide show
  1. flwr/cli/build.py +2 -2
  2. flwr/cli/config_utils.py +97 -0
  3. flwr/cli/log.py +63 -97
  4. flwr/cli/new/templates/app/code/flwr_tune/dataset.py.tpl +1 -1
  5. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +1 -0
  6. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +1 -1
  7. flwr/cli/run/run.py +34 -88
  8. flwr/client/app.py +23 -20
  9. flwr/client/clientapp/app.py +22 -18
  10. flwr/client/nodestate/__init__.py +25 -0
  11. flwr/client/nodestate/in_memory_nodestate.py +38 -0
  12. flwr/client/nodestate/nodestate.py +30 -0
  13. flwr/client/nodestate/nodestate_factory.py +37 -0
  14. flwr/client/{node_state.py → run_info_store.py} +4 -3
  15. flwr/client/supernode/app.py +6 -8
  16. flwr/common/args.py +83 -0
  17. flwr/common/config.py +10 -0
  18. flwr/common/constant.py +39 -5
  19. flwr/common/context.py +9 -4
  20. flwr/common/date.py +3 -3
  21. flwr/common/logger.py +108 -1
  22. flwr/common/object_ref.py +47 -16
  23. flwr/common/serde.py +24 -0
  24. flwr/common/telemetry.py +0 -6
  25. flwr/common/typing.py +10 -1
  26. flwr/proto/exec_pb2.py +14 -17
  27. flwr/proto/exec_pb2.pyi +14 -22
  28. flwr/proto/log_pb2.py +29 -0
  29. flwr/proto/log_pb2.pyi +39 -0
  30. flwr/proto/log_pb2_grpc.py +4 -0
  31. flwr/proto/log_pb2_grpc.pyi +4 -0
  32. flwr/proto/message_pb2.py +8 -8
  33. flwr/proto/message_pb2.pyi +4 -1
  34. flwr/proto/run_pb2.py +32 -27
  35. flwr/proto/run_pb2.pyi +26 -0
  36. flwr/proto/serverappio_pb2.py +52 -0
  37. flwr/proto/{driver_pb2.pyi → serverappio_pb2.pyi} +54 -0
  38. flwr/proto/serverappio_pb2_grpc.py +376 -0
  39. flwr/proto/serverappio_pb2_grpc.pyi +147 -0
  40. flwr/proto/simulationio_pb2.py +38 -0
  41. flwr/proto/simulationio_pb2.pyi +65 -0
  42. flwr/proto/simulationio_pb2_grpc.py +205 -0
  43. flwr/proto/simulationio_pb2_grpc.pyi +81 -0
  44. flwr/server/app.py +272 -105
  45. flwr/server/driver/driver.py +15 -1
  46. flwr/server/driver/grpc_driver.py +25 -36
  47. flwr/server/driver/inmemory_driver.py +6 -16
  48. flwr/server/run_serverapp.py +29 -23
  49. flwr/server/{superlink/state → serverapp}/__init__.py +3 -9
  50. flwr/server/serverapp/app.py +214 -0
  51. flwr/server/strategy/aggregate.py +4 -4
  52. flwr/server/strategy/fedadam.py +11 -1
  53. flwr/server/superlink/driver/__init__.py +1 -1
  54. flwr/server/superlink/driver/{driver_grpc.py → serverappio_grpc.py} +19 -16
  55. flwr/server/superlink/driver/{driver_servicer.py → serverappio_servicer.py} +125 -39
  56. flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +4 -2
  57. flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +2 -2
  58. flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +4 -2
  59. flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +2 -2
  60. flwr/server/superlink/fleet/message_handler/message_handler.py +7 -7
  61. flwr/server/superlink/fleet/rest_rere/rest_api.py +7 -7
  62. flwr/server/superlink/fleet/vce/vce_api.py +23 -23
  63. flwr/server/superlink/linkstate/__init__.py +28 -0
  64. flwr/server/superlink/{state/in_memory_state.py → linkstate/in_memory_linkstate.py} +184 -36
  65. flwr/server/superlink/{state/state.py → linkstate/linkstate.py} +149 -19
  66. flwr/server/superlink/{state/state_factory.py → linkstate/linkstate_factory.py} +9 -9
  67. flwr/server/superlink/{state/sqlite_state.py → linkstate/sqlite_linkstate.py} +306 -65
  68. flwr/server/superlink/{state → linkstate}/utils.py +81 -30
  69. flwr/server/superlink/simulation/__init__.py +15 -0
  70. flwr/server/superlink/simulation/simulationio_grpc.py +65 -0
  71. flwr/server/superlink/simulation/simulationio_servicer.py +153 -0
  72. flwr/simulation/__init__.py +5 -1
  73. flwr/simulation/app.py +273 -345
  74. flwr/simulation/legacy_app.py +382 -0
  75. flwr/simulation/ray_transport/ray_client_proxy.py +2 -2
  76. flwr/simulation/run_simulation.py +57 -131
  77. flwr/simulation/simulationio_connection.py +86 -0
  78. flwr/superexec/app.py +6 -134
  79. flwr/superexec/deployment.py +61 -66
  80. flwr/superexec/exec_grpc.py +15 -8
  81. flwr/superexec/exec_servicer.py +36 -65
  82. flwr/superexec/executor.py +26 -7
  83. flwr/superexec/simulation.py +54 -107
  84. {flwr_nightly-1.13.0.dev20241021.dist-info → flwr_nightly-1.13.0.dev20241111.dist-info}/METADATA +5 -4
  85. {flwr_nightly-1.13.0.dev20241021.dist-info → flwr_nightly-1.13.0.dev20241111.dist-info}/RECORD +88 -69
  86. {flwr_nightly-1.13.0.dev20241021.dist-info → flwr_nightly-1.13.0.dev20241111.dist-info}/entry_points.txt +2 -0
  87. flwr/client/node_state_tests.py +0 -66
  88. flwr/proto/driver_pb2.py +0 -42
  89. flwr/proto/driver_pb2_grpc.py +0 -239
  90. flwr/proto/driver_pb2_grpc.pyi +0 -94
  91. {flwr_nightly-1.13.0.dev20241021.dist-info → flwr_nightly-1.13.0.dev20241111.dist-info}/LICENSE +0 -0
  92. {flwr_nightly-1.13.0.dev20241021.dist-info → flwr_nightly-1.13.0.dev20241111.dist-info}/WHEEL +0 -0
@@ -0,0 +1,38 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: flwr/proto/simulationio.proto
4
+ # Protobuf Python Version: 4.25.0
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 log_pb2 as flwr_dot_proto_dot_log__pb2
16
+ from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
17
+ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
18
+ from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
19
+
20
+
21
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lwr/proto/simulationio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"\x1d\n\x1bPullSimulationInputsRequest\"\x80\x01\n\x1cPullSimulationInputsResponse\x12$\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Fab\"T\n\x1cPushSimulationOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1f\n\x1dPushSimulationOutputsResponse2\xff\x03\n\x0cSimulationIo\x12k\n\x14PullSimulationInputs\x12\'.flwr.proto.PullSimulationInputsRequest\x1a(.flwr.proto.PullSimulationInputsResponse\"\x00\x12n\n\x15PushSimulationOutputs\x12(.flwr.proto.PushSimulationOutputsRequest\x1a).flwr.proto.PushSimulationOutputsResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x12G\n\x08PushLogs\x12\x1b.flwr.proto.PushLogsRequest\x1a\x1c.flwr.proto.PushLogsResponse\"\x00\x12k\n\x14GetFederationOptions\x12\'.flwr.proto.GetFederationOptionsRequest\x1a(.flwr.proto.GetFederationOptionsResponse\"\x00\x62\x06proto3')
22
+
23
+ _globals = globals()
24
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
25
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.simulationio_pb2', _globals)
26
+ if _descriptor._USE_C_DESCRIPTORS == False:
27
+ DESCRIPTOR._options = None
28
+ _globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_start=137
29
+ _globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_end=166
30
+ _globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_start=169
31
+ _globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_end=297
32
+ _globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_start=299
33
+ _globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_end=383
34
+ _globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_start=385
35
+ _globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_end=416
36
+ _globals['_SIMULATIONIO']._serialized_start=419
37
+ _globals['_SIMULATIONIO']._serialized_end=930
38
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,65 @@
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.message
11
+ import typing
12
+ import typing_extensions
13
+
14
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
15
+
16
+ class PullSimulationInputsRequest(google.protobuf.message.Message):
17
+ """PullSimulationInputs messages"""
18
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
19
+ def __init__(self,
20
+ ) -> None: ...
21
+ global___PullSimulationInputsRequest = PullSimulationInputsRequest
22
+
23
+ class PullSimulationInputsResponse(google.protobuf.message.Message):
24
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
25
+ CONTEXT_FIELD_NUMBER: builtins.int
26
+ RUN_FIELD_NUMBER: builtins.int
27
+ FAB_FIELD_NUMBER: builtins.int
28
+ @property
29
+ def context(self) -> flwr.proto.message_pb2.Context: ...
30
+ @property
31
+ def run(self) -> flwr.proto.run_pb2.Run: ...
32
+ @property
33
+ def fab(self) -> flwr.proto.fab_pb2.Fab: ...
34
+ def __init__(self,
35
+ *,
36
+ context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
37
+ run: typing.Optional[flwr.proto.run_pb2.Run] = ...,
38
+ fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
39
+ ) -> None: ...
40
+ def HasField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> builtins.bool: ...
41
+ def ClearField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> None: ...
42
+ global___PullSimulationInputsResponse = PullSimulationInputsResponse
43
+
44
+ class PushSimulationOutputsRequest(google.protobuf.message.Message):
45
+ """PushSimulationOutputs messages"""
46
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
47
+ RUN_ID_FIELD_NUMBER: builtins.int
48
+ CONTEXT_FIELD_NUMBER: builtins.int
49
+ run_id: builtins.int
50
+ @property
51
+ def context(self) -> flwr.proto.message_pb2.Context: ...
52
+ def __init__(self,
53
+ *,
54
+ run_id: builtins.int = ...,
55
+ context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
56
+ ) -> None: ...
57
+ def HasField(self, field_name: typing_extensions.Literal["context",b"context"]) -> builtins.bool: ...
58
+ def ClearField(self, field_name: typing_extensions.Literal["context",b"context","run_id",b"run_id"]) -> None: ...
59
+ global___PushSimulationOutputsRequest = PushSimulationOutputsRequest
60
+
61
+ class PushSimulationOutputsResponse(google.protobuf.message.Message):
62
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
63
+ def __init__(self,
64
+ ) -> None: ...
65
+ global___PushSimulationOutputsResponse = PushSimulationOutputsResponse
@@ -0,0 +1,205 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
6
+ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
7
+ from flwr.proto import simulationio_pb2 as flwr_dot_proto_dot_simulationio__pb2
8
+
9
+
10
+ class SimulationIoStub(object):
11
+ """Missing associated documentation comment in .proto file."""
12
+
13
+ def __init__(self, channel):
14
+ """Constructor.
15
+
16
+ Args:
17
+ channel: A grpc.Channel.
18
+ """
19
+ self.PullSimulationInputs = channel.unary_unary(
20
+ '/flwr.proto.SimulationIo/PullSimulationInputs',
21
+ request_serializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
22
+ response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
23
+ )
24
+ self.PushSimulationOutputs = channel.unary_unary(
25
+ '/flwr.proto.SimulationIo/PushSimulationOutputs',
26
+ request_serializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
27
+ response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
28
+ )
29
+ self.UpdateRunStatus = channel.unary_unary(
30
+ '/flwr.proto.SimulationIo/UpdateRunStatus',
31
+ request_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
32
+ response_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
33
+ )
34
+ self.PushLogs = channel.unary_unary(
35
+ '/flwr.proto.SimulationIo/PushLogs',
36
+ request_serializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
37
+ response_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
38
+ )
39
+ self.GetFederationOptions = channel.unary_unary(
40
+ '/flwr.proto.SimulationIo/GetFederationOptions',
41
+ request_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
42
+ response_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
43
+ )
44
+
45
+
46
+ class SimulationIoServicer(object):
47
+ """Missing associated documentation comment in .proto file."""
48
+
49
+ def PullSimulationInputs(self, request, context):
50
+ """Pull Simulation inputs
51
+ """
52
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53
+ context.set_details('Method not implemented!')
54
+ raise NotImplementedError('Method not implemented!')
55
+
56
+ def PushSimulationOutputs(self, request, context):
57
+ """Push Simulation outputs
58
+ """
59
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60
+ context.set_details('Method not implemented!')
61
+ raise NotImplementedError('Method not implemented!')
62
+
63
+ def UpdateRunStatus(self, request, context):
64
+ """Update the status of a given run
65
+ """
66
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
67
+ context.set_details('Method not implemented!')
68
+ raise NotImplementedError('Method not implemented!')
69
+
70
+ def PushLogs(self, request, context):
71
+ """Push ServerApp logs
72
+ """
73
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
74
+ context.set_details('Method not implemented!')
75
+ raise NotImplementedError('Method not implemented!')
76
+
77
+ def GetFederationOptions(self, request, context):
78
+ """Get Federation Options
79
+ """
80
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
81
+ context.set_details('Method not implemented!')
82
+ raise NotImplementedError('Method not implemented!')
83
+
84
+
85
+ def add_SimulationIoServicer_to_server(servicer, server):
86
+ rpc_method_handlers = {
87
+ 'PullSimulationInputs': grpc.unary_unary_rpc_method_handler(
88
+ servicer.PullSimulationInputs,
89
+ request_deserializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.FromString,
90
+ response_serializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.SerializeToString,
91
+ ),
92
+ 'PushSimulationOutputs': grpc.unary_unary_rpc_method_handler(
93
+ servicer.PushSimulationOutputs,
94
+ request_deserializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.FromString,
95
+ response_serializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.SerializeToString,
96
+ ),
97
+ 'UpdateRunStatus': grpc.unary_unary_rpc_method_handler(
98
+ servicer.UpdateRunStatus,
99
+ request_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.FromString,
100
+ response_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.SerializeToString,
101
+ ),
102
+ 'PushLogs': grpc.unary_unary_rpc_method_handler(
103
+ servicer.PushLogs,
104
+ request_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.FromString,
105
+ response_serializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.SerializeToString,
106
+ ),
107
+ 'GetFederationOptions': grpc.unary_unary_rpc_method_handler(
108
+ servicer.GetFederationOptions,
109
+ request_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.FromString,
110
+ response_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.SerializeToString,
111
+ ),
112
+ }
113
+ generic_handler = grpc.method_handlers_generic_handler(
114
+ 'flwr.proto.SimulationIo', rpc_method_handlers)
115
+ server.add_generic_rpc_handlers((generic_handler,))
116
+
117
+
118
+ # This class is part of an EXPERIMENTAL API.
119
+ class SimulationIo(object):
120
+ """Missing associated documentation comment in .proto file."""
121
+
122
+ @staticmethod
123
+ def PullSimulationInputs(request,
124
+ target,
125
+ options=(),
126
+ channel_credentials=None,
127
+ call_credentials=None,
128
+ insecure=False,
129
+ compression=None,
130
+ wait_for_ready=None,
131
+ timeout=None,
132
+ metadata=None):
133
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PullSimulationInputs',
134
+ flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
135
+ flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
136
+ options, channel_credentials,
137
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
138
+
139
+ @staticmethod
140
+ def PushSimulationOutputs(request,
141
+ target,
142
+ options=(),
143
+ channel_credentials=None,
144
+ call_credentials=None,
145
+ insecure=False,
146
+ compression=None,
147
+ wait_for_ready=None,
148
+ timeout=None,
149
+ metadata=None):
150
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushSimulationOutputs',
151
+ flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
152
+ flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
153
+ options, channel_credentials,
154
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
155
+
156
+ @staticmethod
157
+ def UpdateRunStatus(request,
158
+ target,
159
+ options=(),
160
+ channel_credentials=None,
161
+ call_credentials=None,
162
+ insecure=False,
163
+ compression=None,
164
+ wait_for_ready=None,
165
+ timeout=None,
166
+ metadata=None):
167
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/UpdateRunStatus',
168
+ flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
169
+ flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
170
+ options, channel_credentials,
171
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
172
+
173
+ @staticmethod
174
+ def PushLogs(request,
175
+ target,
176
+ options=(),
177
+ channel_credentials=None,
178
+ call_credentials=None,
179
+ insecure=False,
180
+ compression=None,
181
+ wait_for_ready=None,
182
+ timeout=None,
183
+ metadata=None):
184
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushLogs',
185
+ flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
186
+ flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
187
+ options, channel_credentials,
188
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
189
+
190
+ @staticmethod
191
+ def GetFederationOptions(request,
192
+ target,
193
+ options=(),
194
+ channel_credentials=None,
195
+ call_credentials=None,
196
+ insecure=False,
197
+ compression=None,
198
+ wait_for_ready=None,
199
+ timeout=None,
200
+ metadata=None):
201
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetFederationOptions',
202
+ flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
203
+ flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
204
+ options, channel_credentials,
205
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -0,0 +1,81 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+ import abc
6
+ import flwr.proto.log_pb2
7
+ import flwr.proto.run_pb2
8
+ import flwr.proto.simulationio_pb2
9
+ import grpc
10
+
11
+ class SimulationIoStub:
12
+ def __init__(self, channel: grpc.Channel) -> None: ...
13
+ PullSimulationInputs: grpc.UnaryUnaryMultiCallable[
14
+ flwr.proto.simulationio_pb2.PullSimulationInputsRequest,
15
+ flwr.proto.simulationio_pb2.PullSimulationInputsResponse]
16
+ """Pull Simulation inputs"""
17
+
18
+ PushSimulationOutputs: grpc.UnaryUnaryMultiCallable[
19
+ flwr.proto.simulationio_pb2.PushSimulationOutputsRequest,
20
+ flwr.proto.simulationio_pb2.PushSimulationOutputsResponse]
21
+ """Push Simulation outputs"""
22
+
23
+ UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
24
+ flwr.proto.run_pb2.UpdateRunStatusRequest,
25
+ flwr.proto.run_pb2.UpdateRunStatusResponse]
26
+ """Update the status of a given run"""
27
+
28
+ PushLogs: grpc.UnaryUnaryMultiCallable[
29
+ flwr.proto.log_pb2.PushLogsRequest,
30
+ flwr.proto.log_pb2.PushLogsResponse]
31
+ """Push ServerApp logs"""
32
+
33
+ GetFederationOptions: grpc.UnaryUnaryMultiCallable[
34
+ flwr.proto.run_pb2.GetFederationOptionsRequest,
35
+ flwr.proto.run_pb2.GetFederationOptionsResponse]
36
+ """Get Federation Options"""
37
+
38
+
39
+ class SimulationIoServicer(metaclass=abc.ABCMeta):
40
+ @abc.abstractmethod
41
+ def PullSimulationInputs(self,
42
+ request: flwr.proto.simulationio_pb2.PullSimulationInputsRequest,
43
+ context: grpc.ServicerContext,
44
+ ) -> flwr.proto.simulationio_pb2.PullSimulationInputsResponse:
45
+ """Pull Simulation inputs"""
46
+ pass
47
+
48
+ @abc.abstractmethod
49
+ def PushSimulationOutputs(self,
50
+ request: flwr.proto.simulationio_pb2.PushSimulationOutputsRequest,
51
+ context: grpc.ServicerContext,
52
+ ) -> flwr.proto.simulationio_pb2.PushSimulationOutputsResponse:
53
+ """Push Simulation outputs"""
54
+ pass
55
+
56
+ @abc.abstractmethod
57
+ def UpdateRunStatus(self,
58
+ request: flwr.proto.run_pb2.UpdateRunStatusRequest,
59
+ context: grpc.ServicerContext,
60
+ ) -> flwr.proto.run_pb2.UpdateRunStatusResponse:
61
+ """Update the status of a given run"""
62
+ pass
63
+
64
+ @abc.abstractmethod
65
+ def PushLogs(self,
66
+ request: flwr.proto.log_pb2.PushLogsRequest,
67
+ context: grpc.ServicerContext,
68
+ ) -> flwr.proto.log_pb2.PushLogsResponse:
69
+ """Push ServerApp logs"""
70
+ pass
71
+
72
+ @abc.abstractmethod
73
+ def GetFederationOptions(self,
74
+ request: flwr.proto.run_pb2.GetFederationOptionsRequest,
75
+ context: grpc.ServicerContext,
76
+ ) -> flwr.proto.run_pb2.GetFederationOptionsResponse:
77
+ """Get Federation Options"""
78
+ pass
79
+
80
+
81
+ def add_SimulationIoServicer_to_server(servicer: SimulationIoServicer, server: grpc.Server) -> None: ...