flwr-nightly 1.8.0.dev20240314__py3-none-any.whl → 1.15.0.dev20250114__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- flwr/cli/app.py +16 -2
- flwr/cli/build.py +181 -0
- flwr/cli/cli_user_auth_interceptor.py +90 -0
- flwr/cli/config_utils.py +343 -0
- flwr/cli/example.py +4 -1
- flwr/cli/install.py +253 -0
- flwr/cli/log.py +182 -0
- flwr/{server/superlink/state → cli/login}/__init__.py +4 -10
- flwr/cli/login/login.py +88 -0
- flwr/cli/ls.py +327 -0
- flwr/cli/new/__init__.py +1 -0
- flwr/cli/new/new.py +210 -66
- flwr/cli/new/templates/app/.gitignore.tpl +163 -0
- flwr/cli/new/templates/app/LICENSE.tpl +202 -0
- flwr/cli/new/templates/app/README.baseline.md.tpl +127 -0
- flwr/cli/new/templates/app/README.flowertune.md.tpl +66 -0
- flwr/cli/new/templates/app/README.md.tpl +16 -32
- flwr/cli/new/templates/app/code/__init__.baseline.py.tpl +1 -0
- flwr/cli/new/templates/app/code/__init__.py.tpl +1 -1
- flwr/cli/new/templates/app/code/client.baseline.py.tpl +58 -0
- flwr/cli/new/templates/app/code/client.huggingface.py.tpl +55 -0
- flwr/cli/new/templates/app/code/client.jax.py.tpl +50 -0
- flwr/cli/new/templates/app/code/client.mlx.py.tpl +73 -0
- flwr/cli/new/templates/app/code/client.numpy.py.tpl +7 -7
- flwr/cli/new/templates/app/code/client.pytorch.py.tpl +30 -21
- flwr/cli/new/templates/app/code/client.sklearn.py.tpl +63 -0
- flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +57 -1
- flwr/cli/new/templates/app/code/dataset.baseline.py.tpl +36 -0
- flwr/cli/new/templates/app/code/flwr_tune/__init__.py +15 -0
- flwr/cli/new/templates/app/code/flwr_tune/client_app.py.tpl +126 -0
- flwr/cli/new/templates/app/code/flwr_tune/dataset.py.tpl +87 -0
- flwr/cli/new/templates/app/code/flwr_tune/models.py.tpl +78 -0
- flwr/cli/new/templates/app/code/flwr_tune/server_app.py.tpl +94 -0
- flwr/cli/new/templates/app/code/flwr_tune/strategy.py.tpl +83 -0
- flwr/cli/new/templates/app/code/model.baseline.py.tpl +80 -0
- flwr/cli/new/templates/app/code/server.baseline.py.tpl +46 -0
- flwr/cli/new/templates/app/code/server.huggingface.py.tpl +38 -0
- flwr/cli/new/templates/app/code/server.jax.py.tpl +26 -0
- flwr/cli/new/templates/app/code/server.mlx.py.tpl +31 -0
- flwr/cli/new/templates/app/code/server.numpy.py.tpl +22 -9
- flwr/cli/new/templates/app/code/server.pytorch.py.tpl +21 -18
- flwr/cli/new/templates/app/code/server.sklearn.py.tpl +36 -0
- flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +29 -1
- flwr/cli/new/templates/app/code/strategy.baseline.py.tpl +1 -0
- flwr/cli/new/templates/app/code/task.huggingface.py.tpl +102 -0
- flwr/cli/new/templates/app/code/task.jax.py.tpl +57 -0
- flwr/cli/new/templates/app/code/task.mlx.py.tpl +102 -0
- flwr/cli/new/templates/app/code/task.numpy.py.tpl +7 -0
- flwr/cli/new/templates/app/code/task.pytorch.py.tpl +29 -24
- flwr/cli/new/templates/app/code/task.sklearn.py.tpl +67 -0
- flwr/cli/new/templates/app/code/task.tensorflow.py.tpl +53 -0
- flwr/cli/new/templates/app/code/utils.baseline.py.tpl +1 -0
- flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +138 -0
- flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +68 -0
- flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +46 -0
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +35 -0
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +39 -0
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +25 -12
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +29 -14
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +35 -0
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +29 -14
- flwr/cli/run/__init__.py +1 -0
- flwr/cli/run/run.py +212 -34
- flwr/cli/stop.py +130 -0
- flwr/cli/utils.py +240 -5
- flwr/client/__init__.py +3 -2
- flwr/client/app.py +432 -255
- flwr/client/client.py +1 -11
- flwr/client/client_app.py +74 -13
- flwr/client/clientapp/__init__.py +22 -0
- flwr/client/clientapp/app.py +259 -0
- flwr/client/clientapp/clientappio_servicer.py +244 -0
- flwr/client/clientapp/utils.py +115 -0
- flwr/client/dpfedavg_numpy_client.py +7 -8
- flwr/client/grpc_adapter_client/__init__.py +15 -0
- flwr/client/grpc_adapter_client/connection.py +98 -0
- flwr/client/grpc_client/connection.py +21 -7
- flwr/client/grpc_rere_client/__init__.py +1 -1
- flwr/client/grpc_rere_client/client_interceptor.py +176 -0
- flwr/client/grpc_rere_client/connection.py +163 -56
- flwr/client/grpc_rere_client/grpc_adapter.py +167 -0
- flwr/client/heartbeat.py +74 -0
- flwr/client/message_handler/__init__.py +1 -1
- flwr/client/message_handler/message_handler.py +10 -11
- flwr/client/mod/__init__.py +5 -5
- flwr/client/mod/centraldp_mods.py +4 -2
- flwr/client/mod/comms_mods.py +5 -4
- flwr/client/mod/localdp_mod.py +10 -5
- flwr/client/mod/secure_aggregation/__init__.py +1 -1
- flwr/client/mod/secure_aggregation/secaggplus_mod.py +26 -26
- flwr/client/mod/utils.py +2 -4
- flwr/client/nodestate/__init__.py +26 -0
- flwr/client/nodestate/in_memory_nodestate.py +38 -0
- flwr/client/nodestate/nodestate.py +31 -0
- flwr/client/nodestate/nodestate_factory.py +38 -0
- flwr/client/numpy_client.py +8 -31
- flwr/client/rest_client/__init__.py +1 -1
- flwr/client/rest_client/connection.py +199 -176
- flwr/client/run_info_store.py +112 -0
- flwr/client/supernode/__init__.py +24 -0
- flwr/client/supernode/app.py +321 -0
- flwr/client/typing.py +1 -0
- flwr/common/__init__.py +17 -11
- flwr/common/address.py +47 -3
- flwr/common/args.py +153 -0
- flwr/common/auth_plugin/__init__.py +24 -0
- flwr/common/auth_plugin/auth_plugin.py +121 -0
- flwr/common/config.py +243 -0
- flwr/common/constant.py +132 -1
- flwr/common/context.py +32 -2
- flwr/common/date.py +22 -4
- flwr/common/differential_privacy.py +2 -2
- flwr/common/dp.py +2 -4
- flwr/common/exit_handlers.py +3 -3
- flwr/common/grpc.py +164 -5
- flwr/common/logger.py +230 -12
- flwr/common/message.py +191 -106
- flwr/common/object_ref.py +179 -44
- flwr/common/pyproject.py +1 -0
- flwr/common/record/__init__.py +2 -1
- flwr/common/record/configsrecord.py +58 -18
- flwr/common/record/metricsrecord.py +57 -17
- flwr/common/record/parametersrecord.py +88 -20
- flwr/common/record/recordset.py +153 -30
- flwr/common/record/typeddict.py +30 -55
- flwr/common/recordset_compat.py +31 -12
- flwr/common/retry_invoker.py +123 -30
- flwr/common/secure_aggregation/__init__.py +1 -1
- flwr/common/secure_aggregation/crypto/__init__.py +1 -1
- flwr/common/secure_aggregation/crypto/shamir.py +11 -11
- flwr/common/secure_aggregation/crypto/symmetric_encryption.py +68 -4
- flwr/common/secure_aggregation/ndarrays_arithmetic.py +17 -17
- flwr/common/secure_aggregation/quantization.py +8 -8
- flwr/common/secure_aggregation/secaggplus_constants.py +1 -1
- flwr/common/secure_aggregation/secaggplus_utils.py +10 -12
- flwr/common/serde.py +298 -19
- flwr/common/telemetry.py +65 -29
- flwr/common/typing.py +120 -19
- flwr/common/version.py +17 -3
- flwr/proto/clientappio_pb2.py +45 -0
- flwr/proto/clientappio_pb2.pyi +132 -0
- flwr/proto/clientappio_pb2_grpc.py +135 -0
- flwr/proto/clientappio_pb2_grpc.pyi +53 -0
- flwr/proto/exec_pb2.py +62 -0
- flwr/proto/exec_pb2.pyi +212 -0
- flwr/proto/exec_pb2_grpc.py +237 -0
- flwr/proto/exec_pb2_grpc.pyi +93 -0
- flwr/proto/fab_pb2.py +31 -0
- flwr/proto/fab_pb2.pyi +65 -0
- flwr/proto/fab_pb2_grpc.py +4 -0
- flwr/proto/fab_pb2_grpc.pyi +4 -0
- flwr/proto/fleet_pb2.py +42 -23
- flwr/proto/fleet_pb2.pyi +123 -1
- flwr/proto/fleet_pb2_grpc.py +170 -0
- flwr/proto/fleet_pb2_grpc.pyi +61 -0
- flwr/proto/grpcadapter_pb2.py +32 -0
- flwr/proto/grpcadapter_pb2.pyi +43 -0
- flwr/proto/grpcadapter_pb2_grpc.py +66 -0
- flwr/proto/grpcadapter_pb2_grpc.pyi +24 -0
- flwr/proto/log_pb2.py +29 -0
- flwr/proto/log_pb2.pyi +39 -0
- flwr/proto/log_pb2_grpc.py +4 -0
- flwr/proto/log_pb2_grpc.pyi +4 -0
- flwr/proto/message_pb2.py +41 -0
- flwr/proto/message_pb2.pyi +128 -0
- flwr/proto/message_pb2_grpc.py +4 -0
- flwr/proto/message_pb2_grpc.pyi +4 -0
- flwr/proto/node_pb2.py +1 -1
- flwr/proto/recordset_pb2.py +35 -33
- flwr/proto/recordset_pb2.pyi +40 -14
- flwr/proto/run_pb2.py +64 -0
- flwr/proto/run_pb2.pyi +268 -0
- flwr/proto/run_pb2_grpc.py +4 -0
- flwr/proto/run_pb2_grpc.pyi +4 -0
- flwr/proto/serverappio_pb2.py +52 -0
- flwr/proto/{driver_pb2.pyi → serverappio_pb2.pyi} +62 -20
- flwr/proto/serverappio_pb2_grpc.py +410 -0
- flwr/proto/serverappio_pb2_grpc.pyi +160 -0
- flwr/proto/simulationio_pb2.py +38 -0
- flwr/proto/simulationio_pb2.pyi +65 -0
- flwr/proto/simulationio_pb2_grpc.py +239 -0
- flwr/proto/simulationio_pb2_grpc.pyi +94 -0
- flwr/proto/task_pb2.py +7 -8
- flwr/proto/task_pb2.pyi +8 -5
- flwr/proto/transport_pb2.py +8 -8
- flwr/proto/transport_pb2.pyi +9 -6
- flwr/server/__init__.py +2 -10
- flwr/server/app.py +579 -402
- flwr/server/client_manager.py +8 -6
- flwr/server/compat/app.py +6 -62
- flwr/server/compat/app_utils.py +14 -8
- flwr/server/compat/driver_client_proxy.py +25 -58
- flwr/server/compat/legacy_context.py +5 -4
- flwr/server/driver/__init__.py +2 -0
- flwr/server/driver/driver.py +36 -131
- flwr/server/driver/grpc_driver.py +217 -81
- flwr/server/driver/inmemory_driver.py +182 -0
- flwr/server/history.py +28 -29
- flwr/server/run_serverapp.py +15 -126
- flwr/server/server.py +50 -44
- flwr/server/server_app.py +59 -10
- flwr/server/serverapp/__init__.py +22 -0
- flwr/server/serverapp/app.py +256 -0
- flwr/server/serverapp_components.py +52 -0
- flwr/server/strategy/__init__.py +2 -2
- flwr/server/strategy/aggregate.py +37 -23
- flwr/server/strategy/bulyan.py +9 -9
- flwr/server/strategy/dp_adaptive_clipping.py +25 -25
- flwr/server/strategy/dp_fixed_clipping.py +23 -22
- flwr/server/strategy/dpfedavg_adaptive.py +8 -8
- flwr/server/strategy/dpfedavg_fixed.py +13 -12
- flwr/server/strategy/fault_tolerant_fedavg.py +11 -11
- flwr/server/strategy/fedadagrad.py +9 -9
- flwr/server/strategy/fedadam.py +20 -10
- flwr/server/strategy/fedavg.py +16 -16
- flwr/server/strategy/fedavg_android.py +17 -17
- flwr/server/strategy/fedavgm.py +9 -9
- flwr/server/strategy/fedmedian.py +5 -5
- flwr/server/strategy/fedopt.py +6 -6
- flwr/server/strategy/fedprox.py +7 -7
- flwr/server/strategy/fedtrimmedavg.py +8 -8
- flwr/server/strategy/fedxgb_bagging.py +12 -12
- flwr/server/strategy/fedxgb_cyclic.py +10 -10
- flwr/server/strategy/fedxgb_nn_avg.py +6 -6
- flwr/server/strategy/fedyogi.py +9 -9
- flwr/server/strategy/krum.py +9 -9
- flwr/server/strategy/qfedavg.py +16 -16
- flwr/server/strategy/strategy.py +10 -10
- flwr/server/superlink/driver/__init__.py +2 -2
- flwr/server/superlink/driver/serverappio_grpc.py +61 -0
- flwr/server/superlink/driver/serverappio_servicer.py +363 -0
- flwr/server/superlink/ffs/__init__.py +24 -0
- flwr/server/superlink/ffs/disk_ffs.py +108 -0
- flwr/server/superlink/ffs/ffs.py +79 -0
- flwr/server/superlink/ffs/ffs_factory.py +47 -0
- flwr/server/superlink/fleet/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_adapter/__init__.py +15 -0
- flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +162 -0
- flwr/server/superlink/fleet/grpc_bidi/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +4 -2
- flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +3 -2
- flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +5 -154
- flwr/server/superlink/fleet/grpc_rere/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +120 -13
- flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +228 -0
- flwr/server/superlink/fleet/message_handler/__init__.py +1 -1
- flwr/server/superlink/fleet/message_handler/message_handler.py +153 -9
- flwr/server/superlink/fleet/rest_rere/__init__.py +1 -1
- flwr/server/superlink/fleet/rest_rere/rest_api.py +119 -81
- flwr/server/superlink/fleet/vce/__init__.py +1 -0
- flwr/server/superlink/fleet/vce/backend/__init__.py +4 -4
- flwr/server/superlink/fleet/vce/backend/backend.py +8 -9
- flwr/server/superlink/fleet/vce/backend/raybackend.py +87 -68
- flwr/server/superlink/fleet/vce/vce_api.py +208 -146
- flwr/server/superlink/linkstate/__init__.py +28 -0
- flwr/server/superlink/linkstate/in_memory_linkstate.py +581 -0
- flwr/server/superlink/linkstate/linkstate.py +389 -0
- flwr/server/superlink/{state/state_factory.py → linkstate/linkstate_factory.py} +19 -10
- flwr/server/superlink/linkstate/sqlite_linkstate.py +1236 -0
- flwr/server/superlink/linkstate/utils.py +389 -0
- flwr/server/superlink/simulation/__init__.py +15 -0
- flwr/server/superlink/simulation/simulationio_grpc.py +65 -0
- flwr/server/superlink/simulation/simulationio_servicer.py +186 -0
- flwr/server/superlink/utils.py +65 -0
- flwr/server/typing.py +2 -0
- flwr/server/utils/__init__.py +1 -1
- flwr/server/utils/tensorboard.py +5 -5
- flwr/server/utils/validator.py +31 -11
- flwr/server/workflow/default_workflows.py +70 -26
- flwr/server/workflow/secure_aggregation/secagg_workflow.py +1 -0
- flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +40 -27
- flwr/simulation/__init__.py +12 -5
- flwr/simulation/app.py +247 -315
- flwr/simulation/legacy_app.py +402 -0
- flwr/simulation/ray_transport/__init__.py +1 -1
- flwr/simulation/ray_transport/ray_actor.py +42 -67
- flwr/simulation/ray_transport/ray_client_proxy.py +37 -17
- flwr/simulation/ray_transport/utils.py +1 -0
- flwr/simulation/run_simulation.py +306 -163
- flwr/simulation/simulationio_connection.py +89 -0
- flwr/superexec/__init__.py +15 -0
- flwr/superexec/app.py +59 -0
- flwr/superexec/deployment.py +188 -0
- flwr/superexec/exec_grpc.py +80 -0
- flwr/superexec/exec_servicer.py +231 -0
- flwr/superexec/exec_user_auth_interceptor.py +101 -0
- flwr/superexec/executor.py +96 -0
- flwr/superexec/simulation.py +124 -0
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/METADATA +33 -26
- flwr_nightly-1.15.0.dev20250114.dist-info/RECORD +328 -0
- flwr_nightly-1.15.0.dev20250114.dist-info/entry_points.txt +12 -0
- flwr/cli/flower_toml.py +0 -140
- flwr/cli/new/templates/app/flower.toml.tpl +0 -13
- flwr/cli/new/templates/app/requirements.numpy.txt.tpl +0 -2
- flwr/cli/new/templates/app/requirements.pytorch.txt.tpl +0 -4
- flwr/cli/new/templates/app/requirements.tensorflow.txt.tpl +0 -4
- flwr/client/node_state.py +0 -48
- flwr/client/node_state_tests.py +0 -65
- flwr/proto/driver_pb2.py +0 -44
- flwr/proto/driver_pb2_grpc.py +0 -169
- flwr/proto/driver_pb2_grpc.pyi +0 -66
- flwr/server/superlink/driver/driver_grpc.py +0 -54
- flwr/server/superlink/driver/driver_servicer.py +0 -129
- flwr/server/superlink/state/in_memory_state.py +0 -230
- flwr/server/superlink/state/sqlite_state.py +0 -630
- flwr/server/superlink/state/state.py +0 -154
- flwr_nightly-1.8.0.dev20240314.dist-info/RECORD +0 -211
- flwr_nightly-1.8.0.dev20240314.dist-info/entry_points.txt +0 -9
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/WHEEL +0 -0
flwr/proto/exec_pb2.pyi
ADDED
@@ -0,0 +1,212 @@
|
|
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.recordset_pb2
|
8
|
+
import flwr.proto.run_pb2
|
9
|
+
import flwr.proto.transport_pb2
|
10
|
+
import google.protobuf.descriptor
|
11
|
+
import google.protobuf.internal.containers
|
12
|
+
import google.protobuf.message
|
13
|
+
import typing
|
14
|
+
import typing_extensions
|
15
|
+
|
16
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
17
|
+
|
18
|
+
class StartRunRequest(google.protobuf.message.Message):
|
19
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
20
|
+
class OverrideConfigEntry(google.protobuf.message.Message):
|
21
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
22
|
+
KEY_FIELD_NUMBER: builtins.int
|
23
|
+
VALUE_FIELD_NUMBER: builtins.int
|
24
|
+
key: typing.Text
|
25
|
+
@property
|
26
|
+
def value(self) -> flwr.proto.transport_pb2.Scalar: ...
|
27
|
+
def __init__(self,
|
28
|
+
*,
|
29
|
+
key: typing.Text = ...,
|
30
|
+
value: typing.Optional[flwr.proto.transport_pb2.Scalar] = ...,
|
31
|
+
) -> None: ...
|
32
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
33
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
34
|
+
|
35
|
+
FAB_FIELD_NUMBER: builtins.int
|
36
|
+
OVERRIDE_CONFIG_FIELD_NUMBER: builtins.int
|
37
|
+
FEDERATION_OPTIONS_FIELD_NUMBER: builtins.int
|
38
|
+
@property
|
39
|
+
def fab(self) -> flwr.proto.fab_pb2.Fab: ...
|
40
|
+
@property
|
41
|
+
def override_config(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.transport_pb2.Scalar]: ...
|
42
|
+
@property
|
43
|
+
def federation_options(self) -> flwr.proto.recordset_pb2.ConfigsRecord: ...
|
44
|
+
def __init__(self,
|
45
|
+
*,
|
46
|
+
fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
|
47
|
+
override_config: typing.Optional[typing.Mapping[typing.Text, flwr.proto.transport_pb2.Scalar]] = ...,
|
48
|
+
federation_options: typing.Optional[flwr.proto.recordset_pb2.ConfigsRecord] = ...,
|
49
|
+
) -> None: ...
|
50
|
+
def HasField(self, field_name: typing_extensions.Literal["fab",b"fab","federation_options",b"federation_options"]) -> builtins.bool: ...
|
51
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab",b"fab","federation_options",b"federation_options","override_config",b"override_config"]) -> None: ...
|
52
|
+
global___StartRunRequest = StartRunRequest
|
53
|
+
|
54
|
+
class StartRunResponse(google.protobuf.message.Message):
|
55
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
56
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
57
|
+
run_id: builtins.int
|
58
|
+
def __init__(self,
|
59
|
+
*,
|
60
|
+
run_id: typing.Optional[builtins.int] = ...,
|
61
|
+
) -> None: ...
|
62
|
+
def HasField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","run_id",b"run_id"]) -> builtins.bool: ...
|
63
|
+
def ClearField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","run_id",b"run_id"]) -> None: ...
|
64
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_run_id",b"_run_id"]) -> typing.Optional[typing_extensions.Literal["run_id"]]: ...
|
65
|
+
global___StartRunResponse = StartRunResponse
|
66
|
+
|
67
|
+
class StreamLogsRequest(google.protobuf.message.Message):
|
68
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
69
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
70
|
+
AFTER_TIMESTAMP_FIELD_NUMBER: builtins.int
|
71
|
+
run_id: builtins.int
|
72
|
+
after_timestamp: builtins.float
|
73
|
+
def __init__(self,
|
74
|
+
*,
|
75
|
+
run_id: builtins.int = ...,
|
76
|
+
after_timestamp: builtins.float = ...,
|
77
|
+
) -> None: ...
|
78
|
+
def ClearField(self, field_name: typing_extensions.Literal["after_timestamp",b"after_timestamp","run_id",b"run_id"]) -> None: ...
|
79
|
+
global___StreamLogsRequest = StreamLogsRequest
|
80
|
+
|
81
|
+
class StreamLogsResponse(google.protobuf.message.Message):
|
82
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
83
|
+
LOG_OUTPUT_FIELD_NUMBER: builtins.int
|
84
|
+
LATEST_TIMESTAMP_FIELD_NUMBER: builtins.int
|
85
|
+
log_output: typing.Text
|
86
|
+
latest_timestamp: builtins.float
|
87
|
+
def __init__(self,
|
88
|
+
*,
|
89
|
+
log_output: typing.Text = ...,
|
90
|
+
latest_timestamp: builtins.float = ...,
|
91
|
+
) -> None: ...
|
92
|
+
def ClearField(self, field_name: typing_extensions.Literal["latest_timestamp",b"latest_timestamp","log_output",b"log_output"]) -> None: ...
|
93
|
+
global___StreamLogsResponse = StreamLogsResponse
|
94
|
+
|
95
|
+
class ListRunsRequest(google.protobuf.message.Message):
|
96
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
97
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
98
|
+
run_id: builtins.int
|
99
|
+
def __init__(self,
|
100
|
+
*,
|
101
|
+
run_id: typing.Optional[builtins.int] = ...,
|
102
|
+
) -> None: ...
|
103
|
+
def HasField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","run_id",b"run_id"]) -> builtins.bool: ...
|
104
|
+
def ClearField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","run_id",b"run_id"]) -> None: ...
|
105
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_run_id",b"_run_id"]) -> typing.Optional[typing_extensions.Literal["run_id"]]: ...
|
106
|
+
global___ListRunsRequest = ListRunsRequest
|
107
|
+
|
108
|
+
class ListRunsResponse(google.protobuf.message.Message):
|
109
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
110
|
+
class RunDictEntry(google.protobuf.message.Message):
|
111
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
112
|
+
KEY_FIELD_NUMBER: builtins.int
|
113
|
+
VALUE_FIELD_NUMBER: builtins.int
|
114
|
+
key: builtins.int
|
115
|
+
@property
|
116
|
+
def value(self) -> flwr.proto.run_pb2.Run: ...
|
117
|
+
def __init__(self,
|
118
|
+
*,
|
119
|
+
key: builtins.int = ...,
|
120
|
+
value: typing.Optional[flwr.proto.run_pb2.Run] = ...,
|
121
|
+
) -> None: ...
|
122
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
123
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
124
|
+
|
125
|
+
RUN_DICT_FIELD_NUMBER: builtins.int
|
126
|
+
NOW_FIELD_NUMBER: builtins.int
|
127
|
+
@property
|
128
|
+
def run_dict(self) -> google.protobuf.internal.containers.MessageMap[builtins.int, flwr.proto.run_pb2.Run]: ...
|
129
|
+
now: typing.Text
|
130
|
+
def __init__(self,
|
131
|
+
*,
|
132
|
+
run_dict: typing.Optional[typing.Mapping[builtins.int, flwr.proto.run_pb2.Run]] = ...,
|
133
|
+
now: typing.Text = ...,
|
134
|
+
) -> None: ...
|
135
|
+
def ClearField(self, field_name: typing_extensions.Literal["now",b"now","run_dict",b"run_dict"]) -> None: ...
|
136
|
+
global___ListRunsResponse = ListRunsResponse
|
137
|
+
|
138
|
+
class GetLoginDetailsRequest(google.protobuf.message.Message):
|
139
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
140
|
+
def __init__(self,
|
141
|
+
) -> None: ...
|
142
|
+
global___GetLoginDetailsRequest = GetLoginDetailsRequest
|
143
|
+
|
144
|
+
class GetLoginDetailsResponse(google.protobuf.message.Message):
|
145
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
146
|
+
AUTH_TYPE_FIELD_NUMBER: builtins.int
|
147
|
+
DEVICE_CODE_FIELD_NUMBER: builtins.int
|
148
|
+
VERIFICATION_URI_COMPLETE_FIELD_NUMBER: builtins.int
|
149
|
+
EXPIRES_IN_FIELD_NUMBER: builtins.int
|
150
|
+
INTERVAL_FIELD_NUMBER: builtins.int
|
151
|
+
auth_type: typing.Text
|
152
|
+
device_code: typing.Text
|
153
|
+
verification_uri_complete: typing.Text
|
154
|
+
expires_in: builtins.int
|
155
|
+
interval: builtins.int
|
156
|
+
def __init__(self,
|
157
|
+
*,
|
158
|
+
auth_type: typing.Text = ...,
|
159
|
+
device_code: typing.Text = ...,
|
160
|
+
verification_uri_complete: typing.Text = ...,
|
161
|
+
expires_in: builtins.int = ...,
|
162
|
+
interval: builtins.int = ...,
|
163
|
+
) -> None: ...
|
164
|
+
def ClearField(self, field_name: typing_extensions.Literal["auth_type",b"auth_type","device_code",b"device_code","expires_in",b"expires_in","interval",b"interval","verification_uri_complete",b"verification_uri_complete"]) -> None: ...
|
165
|
+
global___GetLoginDetailsResponse = GetLoginDetailsResponse
|
166
|
+
|
167
|
+
class GetAuthTokensRequest(google.protobuf.message.Message):
|
168
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
169
|
+
DEVICE_CODE_FIELD_NUMBER: builtins.int
|
170
|
+
device_code: typing.Text
|
171
|
+
def __init__(self,
|
172
|
+
*,
|
173
|
+
device_code: typing.Text = ...,
|
174
|
+
) -> None: ...
|
175
|
+
def ClearField(self, field_name: typing_extensions.Literal["device_code",b"device_code"]) -> None: ...
|
176
|
+
global___GetAuthTokensRequest = GetAuthTokensRequest
|
177
|
+
|
178
|
+
class GetAuthTokensResponse(google.protobuf.message.Message):
|
179
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
180
|
+
ACCESS_TOKEN_FIELD_NUMBER: builtins.int
|
181
|
+
REFRESH_TOKEN_FIELD_NUMBER: builtins.int
|
182
|
+
access_token: typing.Text
|
183
|
+
refresh_token: typing.Text
|
184
|
+
def __init__(self,
|
185
|
+
*,
|
186
|
+
access_token: typing.Text = ...,
|
187
|
+
refresh_token: typing.Text = ...,
|
188
|
+
) -> None: ...
|
189
|
+
def ClearField(self, field_name: typing_extensions.Literal["access_token",b"access_token","refresh_token",b"refresh_token"]) -> None: ...
|
190
|
+
global___GetAuthTokensResponse = GetAuthTokensResponse
|
191
|
+
|
192
|
+
class StopRunRequest(google.protobuf.message.Message):
|
193
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
194
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
195
|
+
run_id: builtins.int
|
196
|
+
def __init__(self,
|
197
|
+
*,
|
198
|
+
run_id: builtins.int = ...,
|
199
|
+
) -> None: ...
|
200
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
201
|
+
global___StopRunRequest = StopRunRequest
|
202
|
+
|
203
|
+
class StopRunResponse(google.protobuf.message.Message):
|
204
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
205
|
+
SUCCESS_FIELD_NUMBER: builtins.int
|
206
|
+
success: builtins.bool
|
207
|
+
def __init__(self,
|
208
|
+
*,
|
209
|
+
success: builtins.bool = ...,
|
210
|
+
) -> None: ...
|
211
|
+
def ClearField(self, field_name: typing_extensions.Literal["success",b"success"]) -> None: ...
|
212
|
+
global___StopRunResponse = StopRunResponse
|
@@ -0,0 +1,237 @@
|
|
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 exec_pb2 as flwr_dot_proto_dot_exec__pb2
|
6
|
+
|
7
|
+
|
8
|
+
class ExecStub(object):
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
10
|
+
|
11
|
+
def __init__(self, channel):
|
12
|
+
"""Constructor.
|
13
|
+
|
14
|
+
Args:
|
15
|
+
channel: A grpc.Channel.
|
16
|
+
"""
|
17
|
+
self.StartRun = channel.unary_unary(
|
18
|
+
'/flwr.proto.Exec/StartRun',
|
19
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.StartRunRequest.SerializeToString,
|
20
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.StartRunResponse.FromString,
|
21
|
+
)
|
22
|
+
self.StopRun = channel.unary_unary(
|
23
|
+
'/flwr.proto.Exec/StopRun',
|
24
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.StopRunRequest.SerializeToString,
|
25
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.StopRunResponse.FromString,
|
26
|
+
)
|
27
|
+
self.StreamLogs = channel.unary_stream(
|
28
|
+
'/flwr.proto.Exec/StreamLogs',
|
29
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.StreamLogsRequest.SerializeToString,
|
30
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.StreamLogsResponse.FromString,
|
31
|
+
)
|
32
|
+
self.ListRuns = channel.unary_unary(
|
33
|
+
'/flwr.proto.Exec/ListRuns',
|
34
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.ListRunsRequest.SerializeToString,
|
35
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.ListRunsResponse.FromString,
|
36
|
+
)
|
37
|
+
self.GetLoginDetails = channel.unary_unary(
|
38
|
+
'/flwr.proto.Exec/GetLoginDetails',
|
39
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsRequest.SerializeToString,
|
40
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsResponse.FromString,
|
41
|
+
)
|
42
|
+
self.GetAuthTokens = channel.unary_unary(
|
43
|
+
'/flwr.proto.Exec/GetAuthTokens',
|
44
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensRequest.SerializeToString,
|
45
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensResponse.FromString,
|
46
|
+
)
|
47
|
+
|
48
|
+
|
49
|
+
class ExecServicer(object):
|
50
|
+
"""Missing associated documentation comment in .proto file."""
|
51
|
+
|
52
|
+
def StartRun(self, request, context):
|
53
|
+
"""Start run upon request
|
54
|
+
"""
|
55
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
56
|
+
context.set_details('Method not implemented!')
|
57
|
+
raise NotImplementedError('Method not implemented!')
|
58
|
+
|
59
|
+
def StopRun(self, request, context):
|
60
|
+
"""Stop run upon request
|
61
|
+
"""
|
62
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
63
|
+
context.set_details('Method not implemented!')
|
64
|
+
raise NotImplementedError('Method not implemented!')
|
65
|
+
|
66
|
+
def StreamLogs(self, request, context):
|
67
|
+
"""Start log stream upon request
|
68
|
+
"""
|
69
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
70
|
+
context.set_details('Method not implemented!')
|
71
|
+
raise NotImplementedError('Method not implemented!')
|
72
|
+
|
73
|
+
def ListRuns(self, request, context):
|
74
|
+
"""flwr ls command
|
75
|
+
"""
|
76
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
77
|
+
context.set_details('Method not implemented!')
|
78
|
+
raise NotImplementedError('Method not implemented!')
|
79
|
+
|
80
|
+
def GetLoginDetails(self, request, context):
|
81
|
+
"""Get login details upon request
|
82
|
+
"""
|
83
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
84
|
+
context.set_details('Method not implemented!')
|
85
|
+
raise NotImplementedError('Method not implemented!')
|
86
|
+
|
87
|
+
def GetAuthTokens(self, request, context):
|
88
|
+
"""Get auth tokens upon request
|
89
|
+
"""
|
90
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
91
|
+
context.set_details('Method not implemented!')
|
92
|
+
raise NotImplementedError('Method not implemented!')
|
93
|
+
|
94
|
+
|
95
|
+
def add_ExecServicer_to_server(servicer, server):
|
96
|
+
rpc_method_handlers = {
|
97
|
+
'StartRun': grpc.unary_unary_rpc_method_handler(
|
98
|
+
servicer.StartRun,
|
99
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.StartRunRequest.FromString,
|
100
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.StartRunResponse.SerializeToString,
|
101
|
+
),
|
102
|
+
'StopRun': grpc.unary_unary_rpc_method_handler(
|
103
|
+
servicer.StopRun,
|
104
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.StopRunRequest.FromString,
|
105
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.StopRunResponse.SerializeToString,
|
106
|
+
),
|
107
|
+
'StreamLogs': grpc.unary_stream_rpc_method_handler(
|
108
|
+
servicer.StreamLogs,
|
109
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.StreamLogsRequest.FromString,
|
110
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.StreamLogsResponse.SerializeToString,
|
111
|
+
),
|
112
|
+
'ListRuns': grpc.unary_unary_rpc_method_handler(
|
113
|
+
servicer.ListRuns,
|
114
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.ListRunsRequest.FromString,
|
115
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.ListRunsResponse.SerializeToString,
|
116
|
+
),
|
117
|
+
'GetLoginDetails': grpc.unary_unary_rpc_method_handler(
|
118
|
+
servicer.GetLoginDetails,
|
119
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsRequest.FromString,
|
120
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsResponse.SerializeToString,
|
121
|
+
),
|
122
|
+
'GetAuthTokens': grpc.unary_unary_rpc_method_handler(
|
123
|
+
servicer.GetAuthTokens,
|
124
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensRequest.FromString,
|
125
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensResponse.SerializeToString,
|
126
|
+
),
|
127
|
+
}
|
128
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
129
|
+
'flwr.proto.Exec', rpc_method_handlers)
|
130
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
131
|
+
|
132
|
+
|
133
|
+
# This class is part of an EXPERIMENTAL API.
|
134
|
+
class Exec(object):
|
135
|
+
"""Missing associated documentation comment in .proto file."""
|
136
|
+
|
137
|
+
@staticmethod
|
138
|
+
def StartRun(request,
|
139
|
+
target,
|
140
|
+
options=(),
|
141
|
+
channel_credentials=None,
|
142
|
+
call_credentials=None,
|
143
|
+
insecure=False,
|
144
|
+
compression=None,
|
145
|
+
wait_for_ready=None,
|
146
|
+
timeout=None,
|
147
|
+
metadata=None):
|
148
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Exec/StartRun',
|
149
|
+
flwr_dot_proto_dot_exec__pb2.StartRunRequest.SerializeToString,
|
150
|
+
flwr_dot_proto_dot_exec__pb2.StartRunResponse.FromString,
|
151
|
+
options, channel_credentials,
|
152
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
153
|
+
|
154
|
+
@staticmethod
|
155
|
+
def StopRun(request,
|
156
|
+
target,
|
157
|
+
options=(),
|
158
|
+
channel_credentials=None,
|
159
|
+
call_credentials=None,
|
160
|
+
insecure=False,
|
161
|
+
compression=None,
|
162
|
+
wait_for_ready=None,
|
163
|
+
timeout=None,
|
164
|
+
metadata=None):
|
165
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Exec/StopRun',
|
166
|
+
flwr_dot_proto_dot_exec__pb2.StopRunRequest.SerializeToString,
|
167
|
+
flwr_dot_proto_dot_exec__pb2.StopRunResponse.FromString,
|
168
|
+
options, channel_credentials,
|
169
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
170
|
+
|
171
|
+
@staticmethod
|
172
|
+
def StreamLogs(request,
|
173
|
+
target,
|
174
|
+
options=(),
|
175
|
+
channel_credentials=None,
|
176
|
+
call_credentials=None,
|
177
|
+
insecure=False,
|
178
|
+
compression=None,
|
179
|
+
wait_for_ready=None,
|
180
|
+
timeout=None,
|
181
|
+
metadata=None):
|
182
|
+
return grpc.experimental.unary_stream(request, target, '/flwr.proto.Exec/StreamLogs',
|
183
|
+
flwr_dot_proto_dot_exec__pb2.StreamLogsRequest.SerializeToString,
|
184
|
+
flwr_dot_proto_dot_exec__pb2.StreamLogsResponse.FromString,
|
185
|
+
options, channel_credentials,
|
186
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
187
|
+
|
188
|
+
@staticmethod
|
189
|
+
def ListRuns(request,
|
190
|
+
target,
|
191
|
+
options=(),
|
192
|
+
channel_credentials=None,
|
193
|
+
call_credentials=None,
|
194
|
+
insecure=False,
|
195
|
+
compression=None,
|
196
|
+
wait_for_ready=None,
|
197
|
+
timeout=None,
|
198
|
+
metadata=None):
|
199
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Exec/ListRuns',
|
200
|
+
flwr_dot_proto_dot_exec__pb2.ListRunsRequest.SerializeToString,
|
201
|
+
flwr_dot_proto_dot_exec__pb2.ListRunsResponse.FromString,
|
202
|
+
options, channel_credentials,
|
203
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
204
|
+
|
205
|
+
@staticmethod
|
206
|
+
def GetLoginDetails(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.Exec/GetLoginDetails',
|
217
|
+
flwr_dot_proto_dot_exec__pb2.GetLoginDetailsRequest.SerializeToString,
|
218
|
+
flwr_dot_proto_dot_exec__pb2.GetLoginDetailsResponse.FromString,
|
219
|
+
options, channel_credentials,
|
220
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
221
|
+
|
222
|
+
@staticmethod
|
223
|
+
def GetAuthTokens(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.Exec/GetAuthTokens',
|
234
|
+
flwr_dot_proto_dot_exec__pb2.GetAuthTokensRequest.SerializeToString,
|
235
|
+
flwr_dot_proto_dot_exec__pb2.GetAuthTokensResponse.FromString,
|
236
|
+
options, channel_credentials,
|
237
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
@@ -0,0 +1,93 @@
|
|
1
|
+
"""
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
3
|
+
isort:skip_file
|
4
|
+
"""
|
5
|
+
import abc
|
6
|
+
import flwr.proto.exec_pb2
|
7
|
+
import grpc
|
8
|
+
import typing
|
9
|
+
|
10
|
+
class ExecStub:
|
11
|
+
def __init__(self, channel: grpc.Channel) -> None: ...
|
12
|
+
StartRun: grpc.UnaryUnaryMultiCallable[
|
13
|
+
flwr.proto.exec_pb2.StartRunRequest,
|
14
|
+
flwr.proto.exec_pb2.StartRunResponse]
|
15
|
+
"""Start run upon request"""
|
16
|
+
|
17
|
+
StopRun: grpc.UnaryUnaryMultiCallable[
|
18
|
+
flwr.proto.exec_pb2.StopRunRequest,
|
19
|
+
flwr.proto.exec_pb2.StopRunResponse]
|
20
|
+
"""Stop run upon request"""
|
21
|
+
|
22
|
+
StreamLogs: grpc.UnaryStreamMultiCallable[
|
23
|
+
flwr.proto.exec_pb2.StreamLogsRequest,
|
24
|
+
flwr.proto.exec_pb2.StreamLogsResponse]
|
25
|
+
"""Start log stream upon request"""
|
26
|
+
|
27
|
+
ListRuns: grpc.UnaryUnaryMultiCallable[
|
28
|
+
flwr.proto.exec_pb2.ListRunsRequest,
|
29
|
+
flwr.proto.exec_pb2.ListRunsResponse]
|
30
|
+
"""flwr ls command"""
|
31
|
+
|
32
|
+
GetLoginDetails: grpc.UnaryUnaryMultiCallable[
|
33
|
+
flwr.proto.exec_pb2.GetLoginDetailsRequest,
|
34
|
+
flwr.proto.exec_pb2.GetLoginDetailsResponse]
|
35
|
+
"""Get login details upon request"""
|
36
|
+
|
37
|
+
GetAuthTokens: grpc.UnaryUnaryMultiCallable[
|
38
|
+
flwr.proto.exec_pb2.GetAuthTokensRequest,
|
39
|
+
flwr.proto.exec_pb2.GetAuthTokensResponse]
|
40
|
+
"""Get auth tokens upon request"""
|
41
|
+
|
42
|
+
|
43
|
+
class ExecServicer(metaclass=abc.ABCMeta):
|
44
|
+
@abc.abstractmethod
|
45
|
+
def StartRun(self,
|
46
|
+
request: flwr.proto.exec_pb2.StartRunRequest,
|
47
|
+
context: grpc.ServicerContext,
|
48
|
+
) -> flwr.proto.exec_pb2.StartRunResponse:
|
49
|
+
"""Start run upon request"""
|
50
|
+
pass
|
51
|
+
|
52
|
+
@abc.abstractmethod
|
53
|
+
def StopRun(self,
|
54
|
+
request: flwr.proto.exec_pb2.StopRunRequest,
|
55
|
+
context: grpc.ServicerContext,
|
56
|
+
) -> flwr.proto.exec_pb2.StopRunResponse:
|
57
|
+
"""Stop run upon request"""
|
58
|
+
pass
|
59
|
+
|
60
|
+
@abc.abstractmethod
|
61
|
+
def StreamLogs(self,
|
62
|
+
request: flwr.proto.exec_pb2.StreamLogsRequest,
|
63
|
+
context: grpc.ServicerContext,
|
64
|
+
) -> typing.Iterator[flwr.proto.exec_pb2.StreamLogsResponse]:
|
65
|
+
"""Start log stream upon request"""
|
66
|
+
pass
|
67
|
+
|
68
|
+
@abc.abstractmethod
|
69
|
+
def ListRuns(self,
|
70
|
+
request: flwr.proto.exec_pb2.ListRunsRequest,
|
71
|
+
context: grpc.ServicerContext,
|
72
|
+
) -> flwr.proto.exec_pb2.ListRunsResponse:
|
73
|
+
"""flwr ls command"""
|
74
|
+
pass
|
75
|
+
|
76
|
+
@abc.abstractmethod
|
77
|
+
def GetLoginDetails(self,
|
78
|
+
request: flwr.proto.exec_pb2.GetLoginDetailsRequest,
|
79
|
+
context: grpc.ServicerContext,
|
80
|
+
) -> flwr.proto.exec_pb2.GetLoginDetailsResponse:
|
81
|
+
"""Get login details upon request"""
|
82
|
+
pass
|
83
|
+
|
84
|
+
@abc.abstractmethod
|
85
|
+
def GetAuthTokens(self,
|
86
|
+
request: flwr.proto.exec_pb2.GetAuthTokensRequest,
|
87
|
+
context: grpc.ServicerContext,
|
88
|
+
) -> flwr.proto.exec_pb2.GetAuthTokensResponse:
|
89
|
+
"""Get auth tokens upon request"""
|
90
|
+
pass
|
91
|
+
|
92
|
+
|
93
|
+
def add_ExecServicer_to_server(servicer: ExecServicer, server: grpc.Server) -> None: ...
|
flwr/proto/fab_pb2.py
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: flwr/proto/fab.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 node_pb2 as flwr_dot_proto_dot_node__pb2
|
16
|
+
|
17
|
+
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"(\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"Q\n\rGetFabRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08hash_str\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3')
|
19
|
+
|
20
|
+
_globals = globals()
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.fab_pb2', _globals)
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
24
|
+
DESCRIPTOR._options = None
|
25
|
+
_globals['_FAB']._serialized_start=59
|
26
|
+
_globals['_FAB']._serialized_end=99
|
27
|
+
_globals['_GETFABREQUEST']._serialized_start=101
|
28
|
+
_globals['_GETFABREQUEST']._serialized_end=182
|
29
|
+
_globals['_GETFABRESPONSE']._serialized_start=184
|
30
|
+
_globals['_GETFABRESPONSE']._serialized_end=230
|
31
|
+
# @@protoc_insertion_point(module_scope)
|
flwr/proto/fab_pb2.pyi
ADDED
@@ -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.node_pb2
|
7
|
+
import google.protobuf.descriptor
|
8
|
+
import google.protobuf.message
|
9
|
+
import typing
|
10
|
+
import typing_extensions
|
11
|
+
|
12
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
13
|
+
|
14
|
+
class Fab(google.protobuf.message.Message):
|
15
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
16
|
+
HASH_STR_FIELD_NUMBER: builtins.int
|
17
|
+
CONTENT_FIELD_NUMBER: builtins.int
|
18
|
+
hash_str: typing.Text
|
19
|
+
"""This field is the hash of the data field. It is used to identify the data.
|
20
|
+
The hash is calculated using the SHA-256 algorithm and is represented as a
|
21
|
+
hex string (sha256hex).
|
22
|
+
"""
|
23
|
+
|
24
|
+
content: builtins.bytes
|
25
|
+
"""This field contains the fab file contents a one bytes blob."""
|
26
|
+
|
27
|
+
def __init__(self,
|
28
|
+
*,
|
29
|
+
hash_str: typing.Text = ...,
|
30
|
+
content: builtins.bytes = ...,
|
31
|
+
) -> None: ...
|
32
|
+
def ClearField(self, field_name: typing_extensions.Literal["content",b"content","hash_str",b"hash_str"]) -> None: ...
|
33
|
+
global___Fab = Fab
|
34
|
+
|
35
|
+
class GetFabRequest(google.protobuf.message.Message):
|
36
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
37
|
+
NODE_FIELD_NUMBER: builtins.int
|
38
|
+
HASH_STR_FIELD_NUMBER: builtins.int
|
39
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
40
|
+
@property
|
41
|
+
def node(self) -> flwr.proto.node_pb2.Node: ...
|
42
|
+
hash_str: typing.Text
|
43
|
+
run_id: builtins.int
|
44
|
+
def __init__(self,
|
45
|
+
*,
|
46
|
+
node: typing.Optional[flwr.proto.node_pb2.Node] = ...,
|
47
|
+
hash_str: typing.Text = ...,
|
48
|
+
run_id: builtins.int = ...,
|
49
|
+
) -> None: ...
|
50
|
+
def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ...
|
51
|
+
def ClearField(self, field_name: typing_extensions.Literal["hash_str",b"hash_str","node",b"node","run_id",b"run_id"]) -> None: ...
|
52
|
+
global___GetFabRequest = GetFabRequest
|
53
|
+
|
54
|
+
class GetFabResponse(google.protobuf.message.Message):
|
55
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
56
|
+
FAB_FIELD_NUMBER: builtins.int
|
57
|
+
@property
|
58
|
+
def fab(self) -> global___Fab: ...
|
59
|
+
def __init__(self,
|
60
|
+
*,
|
61
|
+
fab: typing.Optional[global___Fab] = ...,
|
62
|
+
) -> None: ...
|
63
|
+
def HasField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> builtins.bool: ...
|
64
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> None: ...
|
65
|
+
global___GetFabResponse = GetFabResponse
|