flwr-nightly 1.12.0.dev20240920__py3-none-any.whl → 1.12.0.dev20240924__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.

flwr/cli/app.py CHANGED
@@ -19,6 +19,7 @@ from typer.main import get_command
19
19
 
20
20
  from .build import build
21
21
  from .install import install
22
+ from .log import log
22
23
  from .new import new
23
24
  from .run import run
24
25
 
@@ -35,6 +36,7 @@ app.command()(new)
35
36
  app.command()(run)
36
37
  app.command()(build)
37
38
  app.command()(install)
39
+ app.command()(log)
38
40
 
39
41
  typer_click_object = get_command(app)
40
42
 
flwr/cli/log.py ADDED
@@ -0,0 +1,196 @@
1
+ # Copyright 2024 Flower Labs GmbH. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+ """Flower command line interface `log` command."""
16
+
17
+ import sys
18
+ import time
19
+ from logging import DEBUG, ERROR, INFO
20
+ from pathlib import Path
21
+ from typing import Annotated, Optional
22
+
23
+ import grpc
24
+ import typer
25
+
26
+ from flwr.cli.config_utils import load_and_validate
27
+ from flwr.common.grpc import GRPC_MAX_MESSAGE_LENGTH, create_channel
28
+ from flwr.common.logger import log as logger
29
+
30
+ CONN_REFRESH_PERIOD = 60 # Connection refresh period for log streaming (seconds)
31
+
32
+
33
+ # pylint: disable=unused-argument
34
+ def stream_logs(run_id: int, channel: grpc.Channel, period: int) -> None:
35
+ """Stream logs from the beginning of a run with connection refresh."""
36
+
37
+
38
+ # pylint: disable=unused-argument
39
+ def print_logs(run_id: int, channel: grpc.Channel, timeout: int) -> None:
40
+ """Print logs from the beginning of a run."""
41
+
42
+
43
+ def on_channel_state_change(channel_connectivity: str) -> None:
44
+ """Log channel connectivity."""
45
+ logger(DEBUG, channel_connectivity)
46
+
47
+
48
+ def log(
49
+ run_id: Annotated[
50
+ int,
51
+ typer.Argument(help="The Flower run ID to query"),
52
+ ],
53
+ app: Annotated[
54
+ Path,
55
+ typer.Argument(help="Path of the Flower project to run"),
56
+ ] = Path("."),
57
+ federation: Annotated[
58
+ Optional[str],
59
+ typer.Argument(help="Name of the federation to run the app on"),
60
+ ] = None,
61
+ stream: Annotated[
62
+ bool,
63
+ typer.Option(
64
+ "--stream/--show",
65
+ help="Flag to stream or print logs from the Flower run",
66
+ ),
67
+ ] = True,
68
+ ) -> None:
69
+ """Get logs from a Flower project run."""
70
+ typer.secho("Loading project configuration... ", fg=typer.colors.BLUE)
71
+
72
+ pyproject_path = app / "pyproject.toml" if app else None
73
+ config, errors, warnings = load_and_validate(path=pyproject_path)
74
+
75
+ if config is None:
76
+ typer.secho(
77
+ "Project configuration could not be loaded.\n"
78
+ "pyproject.toml is invalid:\n"
79
+ + "\n".join([f"- {line}" for line in errors]),
80
+ fg=typer.colors.RED,
81
+ bold=True,
82
+ )
83
+ sys.exit()
84
+
85
+ if warnings:
86
+ typer.secho(
87
+ "Project configuration is missing the following "
88
+ "recommended properties:\n" + "\n".join([f"- {line}" for line in warnings]),
89
+ fg=typer.colors.RED,
90
+ bold=True,
91
+ )
92
+
93
+ typer.secho("Success", fg=typer.colors.GREEN)
94
+
95
+ federation = federation or config["tool"]["flwr"]["federations"].get("default")
96
+
97
+ if federation is None:
98
+ typer.secho(
99
+ "❌ No federation name was provided and the project's `pyproject.toml` "
100
+ "doesn't declare a default federation (with a SuperExec address or an "
101
+ "`options.num-supernodes` value).",
102
+ fg=typer.colors.RED,
103
+ bold=True,
104
+ )
105
+ raise typer.Exit(code=1)
106
+
107
+ # Validate the federation exists in the configuration
108
+ federation_config = config["tool"]["flwr"]["federations"].get(federation)
109
+ if federation_config is None:
110
+ available_feds = {
111
+ fed for fed in config["tool"]["flwr"]["federations"] if fed != "default"
112
+ }
113
+ typer.secho(
114
+ f"❌ There is no `{federation}` federation declared in the "
115
+ "`pyproject.toml`.\n The following federations were found:\n\n"
116
+ + "\n".join(available_feds),
117
+ fg=typer.colors.RED,
118
+ bold=True,
119
+ )
120
+ raise typer.Exit(code=1)
121
+
122
+ if "address" not in federation_config:
123
+ typer.secho(
124
+ "❌ `flwr log` currently works with `SuperExec`. Ensure that the correct"
125
+ "`SuperExec` address is provided in the `pyproject.toml`.",
126
+ fg=typer.colors.RED,
127
+ bold=True,
128
+ )
129
+ raise typer.Exit(code=1)
130
+
131
+ _log_with_superexec(federation_config, run_id, stream)
132
+
133
+
134
+ # pylint: disable-next=too-many-branches
135
+ def _log_with_superexec(
136
+ federation_config: dict[str, str],
137
+ run_id: int,
138
+ stream: bool,
139
+ ) -> None:
140
+ insecure_str = federation_config.get("insecure")
141
+ if root_certificates := federation_config.get("root-certificates"):
142
+ root_certificates_bytes = Path(root_certificates).read_bytes()
143
+ if insecure := bool(insecure_str):
144
+ typer.secho(
145
+ "❌ `root_certificates` were provided but the `insecure` parameter"
146
+ "is set to `True`.",
147
+ fg=typer.colors.RED,
148
+ bold=True,
149
+ )
150
+ raise typer.Exit(code=1)
151
+ else:
152
+ root_certificates_bytes = None
153
+ if insecure_str is None:
154
+ typer.secho(
155
+ "❌ To disable TLS, set `insecure = true` in `pyproject.toml`.",
156
+ fg=typer.colors.RED,
157
+ bold=True,
158
+ )
159
+ raise typer.Exit(code=1)
160
+ if not (insecure := bool(insecure_str)):
161
+ typer.secho(
162
+ "❌ No certificate were given yet `insecure` is set to `False`.",
163
+ fg=typer.colors.RED,
164
+ bold=True,
165
+ )
166
+ raise typer.Exit(code=1)
167
+
168
+ channel = create_channel(
169
+ server_address=federation_config["address"],
170
+ insecure=insecure,
171
+ root_certificates=root_certificates_bytes,
172
+ max_message_length=GRPC_MAX_MESSAGE_LENGTH,
173
+ interceptors=None,
174
+ )
175
+ channel.subscribe(on_channel_state_change)
176
+
177
+ if stream:
178
+ try:
179
+ while True:
180
+ logger(INFO, "Starting logstream for run_id `%s`", run_id)
181
+ stream_logs(run_id, channel, CONN_REFRESH_PERIOD)
182
+ time.sleep(2)
183
+ logger(DEBUG, "Reconnecting to logstream")
184
+ except KeyboardInterrupt:
185
+ logger(INFO, "Exiting logstream")
186
+ except grpc.RpcError as e:
187
+ # pylint: disable=E1101
188
+ if e.code() == grpc.StatusCode.NOT_FOUND:
189
+ logger(ERROR, "Invalid run_id `%s`, exiting", run_id)
190
+ if e.code() == grpc.StatusCode.CANCELLED:
191
+ pass
192
+ finally:
193
+ channel.close()
194
+ else:
195
+ logger(INFO, "Printing logstream for run_id `%s`", run_id)
196
+ print_logs(run_id, channel, timeout=5)
flwr/proto/control_pb2.py CHANGED
@@ -15,13 +15,13 @@ _sym_db = _symbol_database.Default()
15
15
  from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
16
16
 
17
17
 
18
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x66lwr/proto/control.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/run.proto2U\n\x07\x43ontrol\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\x62\x06proto3')
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x66lwr/proto/control.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/run.proto2\x88\x02\n\x07\x43ontrol\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\x12S\n\x0cGetRunStatus\x12\x1f.flwr.proto.GetRunStatusRequest\x1a .flwr.proto.GetRunStatusResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x62\x06proto3')
19
19
 
20
20
  _globals = globals()
21
21
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22
22
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.control_pb2', _globals)
23
23
  if _descriptor._USE_C_DESCRIPTORS == False:
24
24
  DESCRIPTOR._options = None
25
- _globals['_CONTROL']._serialized_start=62
26
- _globals['_CONTROL']._serialized_end=147
25
+ _globals['_CONTROL']._serialized_start=63
26
+ _globals['_CONTROL']._serialized_end=327
27
27
  # @@protoc_insertion_point(module_scope)
@@ -19,6 +19,16 @@ class ControlStub(object):
19
19
  request_serializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.SerializeToString,
20
20
  response_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
21
21
  )
22
+ self.GetRunStatus = channel.unary_unary(
23
+ '/flwr.proto.Control/GetRunStatus',
24
+ request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
25
+ response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
26
+ )
27
+ self.UpdateRunStatus = channel.unary_unary(
28
+ '/flwr.proto.Control/UpdateRunStatus',
29
+ request_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
30
+ response_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
31
+ )
22
32
 
23
33
 
24
34
  class ControlServicer(object):
@@ -31,6 +41,20 @@ class ControlServicer(object):
31
41
  context.set_details('Method not implemented!')
32
42
  raise NotImplementedError('Method not implemented!')
33
43
 
44
+ def GetRunStatus(self, request, context):
45
+ """Get the status of a given run
46
+ """
47
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
48
+ context.set_details('Method not implemented!')
49
+ raise NotImplementedError('Method not implemented!')
50
+
51
+ def UpdateRunStatus(self, request, context):
52
+ """Update the status of a given run
53
+ """
54
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55
+ context.set_details('Method not implemented!')
56
+ raise NotImplementedError('Method not implemented!')
57
+
34
58
 
35
59
  def add_ControlServicer_to_server(servicer, server):
36
60
  rpc_method_handlers = {
@@ -39,6 +63,16 @@ def add_ControlServicer_to_server(servicer, server):
39
63
  request_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.FromString,
40
64
  response_serializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.SerializeToString,
41
65
  ),
66
+ 'GetRunStatus': grpc.unary_unary_rpc_method_handler(
67
+ servicer.GetRunStatus,
68
+ request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.FromString,
69
+ response_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.SerializeToString,
70
+ ),
71
+ 'UpdateRunStatus': grpc.unary_unary_rpc_method_handler(
72
+ servicer.UpdateRunStatus,
73
+ request_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.FromString,
74
+ response_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.SerializeToString,
75
+ ),
42
76
  }
43
77
  generic_handler = grpc.method_handlers_generic_handler(
44
78
  'flwr.proto.Control', rpc_method_handlers)
@@ -65,3 +99,37 @@ class Control(object):
65
99
  flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
66
100
  options, channel_credentials,
67
101
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
102
+
103
+ @staticmethod
104
+ def GetRunStatus(request,
105
+ target,
106
+ options=(),
107
+ channel_credentials=None,
108
+ call_credentials=None,
109
+ insecure=False,
110
+ compression=None,
111
+ wait_for_ready=None,
112
+ timeout=None,
113
+ metadata=None):
114
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Control/GetRunStatus',
115
+ flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
116
+ flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
117
+ options, channel_credentials,
118
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
119
+
120
+ @staticmethod
121
+ def UpdateRunStatus(request,
122
+ target,
123
+ options=(),
124
+ channel_credentials=None,
125
+ call_credentials=None,
126
+ insecure=False,
127
+ compression=None,
128
+ wait_for_ready=None,
129
+ timeout=None,
130
+ metadata=None):
131
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Control/UpdateRunStatus',
132
+ flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
133
+ flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
134
+ options, channel_credentials,
135
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -13,6 +13,16 @@ class ControlStub:
13
13
  flwr.proto.run_pb2.CreateRunResponse]
14
14
  """Request to create a new run"""
15
15
 
16
+ GetRunStatus: grpc.UnaryUnaryMultiCallable[
17
+ flwr.proto.run_pb2.GetRunStatusRequest,
18
+ flwr.proto.run_pb2.GetRunStatusResponse]
19
+ """Get the status of a given run"""
20
+
21
+ UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
22
+ flwr.proto.run_pb2.UpdateRunStatusRequest,
23
+ flwr.proto.run_pb2.UpdateRunStatusResponse]
24
+ """Update the status of a given run"""
25
+
16
26
 
17
27
  class ControlServicer(metaclass=abc.ABCMeta):
18
28
  @abc.abstractmethod
@@ -23,5 +33,21 @@ class ControlServicer(metaclass=abc.ABCMeta):
23
33
  """Request to create a new run"""
24
34
  pass
25
35
 
36
+ @abc.abstractmethod
37
+ def GetRunStatus(self,
38
+ request: flwr.proto.run_pb2.GetRunStatusRequest,
39
+ context: grpc.ServicerContext,
40
+ ) -> flwr.proto.run_pb2.GetRunStatusResponse:
41
+ """Get the status of a given run"""
42
+ pass
43
+
44
+ @abc.abstractmethod
45
+ def UpdateRunStatus(self,
46
+ request: flwr.proto.run_pb2.UpdateRunStatusRequest,
47
+ context: grpc.ServicerContext,
48
+ ) -> flwr.proto.run_pb2.UpdateRunStatusResponse:
49
+ """Update the status of a given run"""
50
+ pass
51
+
26
52
 
27
53
  def add_ControlServicer_to_server(servicer: ControlServicer, server: grpc.Server) -> None: ...
flwr/proto/run_pb2.py CHANGED
@@ -16,7 +16,7 @@ from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
16
16
  from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
17
17
 
18
18
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/run.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x1a\x66lwr/proto/transport.proto\"\xd5\x01\n\x03Run\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x0e\n\x06\x66\x61\x62_id\x18\x02 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x03 \x01(\t\x12<\n\x0foverride_config\x18\x04 \x03(\x0b\x32#.flwr.proto.Run.OverrideConfigEntry\x12\x10\n\x08\x66\x61\x62_hash\x18\x05 \x01(\t\x1aI\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"\xeb\x01\n\x10\x43reateRunRequest\x12\x0e\n\x06\x66\x61\x62_id\x18\x01 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x02 \x01(\t\x12I\n\x0foverride_config\x18\x03 \x03(\x0b\x32\x30.flwr.proto.CreateRunRequest.OverrideConfigEntry\x12\x1c\n\x03\x66\x61\x62\x18\x04 \x01(\x0b\x32\x0f.flwr.proto.Fab\x1aI\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"#\n\x11\x43reateRunResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"\x1f\n\rGetRunRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\".\n\x0eGetRunResponse\x12\x1c\n\x03run\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Runb\x06proto3')
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/run.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x1a\x66lwr/proto/transport.proto\"\xd5\x01\n\x03Run\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x0e\n\x06\x66\x61\x62_id\x18\x02 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x03 \x01(\t\x12<\n\x0foverride_config\x18\x04 \x03(\x0b\x32#.flwr.proto.Run.OverrideConfigEntry\x12\x10\n\x08\x66\x61\x62_hash\x18\x05 \x01(\t\x1aI\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"@\n\tRunStatus\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x12\n\nsub_status\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"\xeb\x01\n\x10\x43reateRunRequest\x12\x0e\n\x06\x66\x61\x62_id\x18\x01 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x02 \x01(\t\x12I\n\x0foverride_config\x18\x03 \x03(\x0b\x32\x30.flwr.proto.CreateRunRequest.OverrideConfigEntry\x12\x1c\n\x03\x66\x61\x62\x18\x04 \x01(\x0b\x32\x0f.flwr.proto.Fab\x1aI\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"#\n\x11\x43reateRunResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"\x1f\n\rGetRunRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\".\n\x0eGetRunResponse\x12\x1c\n\x03run\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Run\"S\n\x16UpdateRunStatusRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12)\n\nrun_status\x18\x02 \x01(\x0b\x32\x15.flwr.proto.RunStatus\"\x19\n\x17UpdateRunStatusResponse\"&\n\x13GetRunStatusRequest\x12\x0f\n\x07run_ids\x18\x01 \x03(\x04\"\xb1\x01\n\x14GetRunStatusResponse\x12L\n\x0frun_status_dict\x18\x01 \x03(\x0b\x32\x33.flwr.proto.GetRunStatusResponse.RunStatusDictEntry\x1aK\n\x12RunStatusDictEntry\x12\x0b\n\x03key\x18\x01 \x01(\x04\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.flwr.proto.RunStatus:\x02\x38\x01\x62\x06proto3')
20
20
 
21
21
  _globals = globals()
22
22
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -27,18 +27,32 @@ if _descriptor._USE_C_DESCRIPTORS == False:
27
27
  _globals['_RUN_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
28
28
  _globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._options = None
29
29
  _globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
30
+ _globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._options = None
31
+ _globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_options = b'8\001'
30
32
  _globals['_RUN']._serialized_start=87
31
33
  _globals['_RUN']._serialized_end=300
32
34
  _globals['_RUN_OVERRIDECONFIGENTRY']._serialized_start=227
33
35
  _globals['_RUN_OVERRIDECONFIGENTRY']._serialized_end=300
34
- _globals['_CREATERUNREQUEST']._serialized_start=303
35
- _globals['_CREATERUNREQUEST']._serialized_end=538
36
+ _globals['_RUNSTATUS']._serialized_start=302
37
+ _globals['_RUNSTATUS']._serialized_end=366
38
+ _globals['_CREATERUNREQUEST']._serialized_start=369
39
+ _globals['_CREATERUNREQUEST']._serialized_end=604
36
40
  _globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=227
37
41
  _globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_end=300
38
- _globals['_CREATERUNRESPONSE']._serialized_start=540
39
- _globals['_CREATERUNRESPONSE']._serialized_end=575
40
- _globals['_GETRUNREQUEST']._serialized_start=577
41
- _globals['_GETRUNREQUEST']._serialized_end=608
42
- _globals['_GETRUNRESPONSE']._serialized_start=610
43
- _globals['_GETRUNRESPONSE']._serialized_end=656
42
+ _globals['_CREATERUNRESPONSE']._serialized_start=606
43
+ _globals['_CREATERUNRESPONSE']._serialized_end=641
44
+ _globals['_GETRUNREQUEST']._serialized_start=643
45
+ _globals['_GETRUNREQUEST']._serialized_end=674
46
+ _globals['_GETRUNRESPONSE']._serialized_start=676
47
+ _globals['_GETRUNRESPONSE']._serialized_end=722
48
+ _globals['_UPDATERUNSTATUSREQUEST']._serialized_start=724
49
+ _globals['_UPDATERUNSTATUSREQUEST']._serialized_end=807
50
+ _globals['_UPDATERUNSTATUSRESPONSE']._serialized_start=809
51
+ _globals['_UPDATERUNSTATUSRESPONSE']._serialized_end=834
52
+ _globals['_GETRUNSTATUSREQUEST']._serialized_start=836
53
+ _globals['_GETRUNSTATUSREQUEST']._serialized_end=874
54
+ _globals['_GETRUNSTATUSRESPONSE']._serialized_start=877
55
+ _globals['_GETRUNSTATUSRESPONSE']._serialized_end=1054
56
+ _globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_start=979
57
+ _globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_end=1054
44
58
  # @@protoc_insertion_point(module_scope)
flwr/proto/run_pb2.pyi CHANGED
@@ -52,6 +52,29 @@ class Run(google.protobuf.message.Message):
52
52
  def ClearField(self, field_name: typing_extensions.Literal["fab_hash",b"fab_hash","fab_id",b"fab_id","fab_version",b"fab_version","override_config",b"override_config","run_id",b"run_id"]) -> None: ...
53
53
  global___Run = Run
54
54
 
55
+ class RunStatus(google.protobuf.message.Message):
56
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
57
+ STATUS_FIELD_NUMBER: builtins.int
58
+ SUB_STATUS_FIELD_NUMBER: builtins.int
59
+ DETAILS_FIELD_NUMBER: builtins.int
60
+ status: typing.Text
61
+ """"starting", "running", "finished" """
62
+
63
+ sub_status: typing.Text
64
+ """"completed", "failed", "stopped" or "" (non-finished)"""
65
+
66
+ details: typing.Text
67
+ """failure details"""
68
+
69
+ def __init__(self,
70
+ *,
71
+ status: typing.Text = ...,
72
+ sub_status: typing.Text = ...,
73
+ details: typing.Text = ...,
74
+ ) -> None: ...
75
+ def ClearField(self, field_name: typing_extensions.Literal["details",b"details","status",b"status","sub_status",b"sub_status"]) -> None: ...
76
+ global___RunStatus = RunStatus
77
+
55
78
  class CreateRunRequest(google.protobuf.message.Message):
56
79
  """CreateRun"""
57
80
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -126,3 +149,66 @@ class GetRunResponse(google.protobuf.message.Message):
126
149
  def HasField(self, field_name: typing_extensions.Literal["run",b"run"]) -> builtins.bool: ...
127
150
  def ClearField(self, field_name: typing_extensions.Literal["run",b"run"]) -> None: ...
128
151
  global___GetRunResponse = GetRunResponse
152
+
153
+ class UpdateRunStatusRequest(google.protobuf.message.Message):
154
+ """UpdateRunStatus"""
155
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
156
+ RUN_ID_FIELD_NUMBER: builtins.int
157
+ RUN_STATUS_FIELD_NUMBER: builtins.int
158
+ run_id: builtins.int
159
+ @property
160
+ def run_status(self) -> global___RunStatus: ...
161
+ def __init__(self,
162
+ *,
163
+ run_id: builtins.int = ...,
164
+ run_status: typing.Optional[global___RunStatus] = ...,
165
+ ) -> None: ...
166
+ def HasField(self, field_name: typing_extensions.Literal["run_status",b"run_status"]) -> builtins.bool: ...
167
+ def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id","run_status",b"run_status"]) -> None: ...
168
+ global___UpdateRunStatusRequest = UpdateRunStatusRequest
169
+
170
+ class UpdateRunStatusResponse(google.protobuf.message.Message):
171
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
172
+ def __init__(self,
173
+ ) -> None: ...
174
+ global___UpdateRunStatusResponse = UpdateRunStatusResponse
175
+
176
+ class GetRunStatusRequest(google.protobuf.message.Message):
177
+ """GetRunStatus"""
178
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
179
+ RUN_IDS_FIELD_NUMBER: builtins.int
180
+ @property
181
+ def run_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
182
+ def __init__(self,
183
+ *,
184
+ run_ids: typing.Optional[typing.Iterable[builtins.int]] = ...,
185
+ ) -> None: ...
186
+ def ClearField(self, field_name: typing_extensions.Literal["run_ids",b"run_ids"]) -> None: ...
187
+ global___GetRunStatusRequest = GetRunStatusRequest
188
+
189
+ class GetRunStatusResponse(google.protobuf.message.Message):
190
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
191
+ class RunStatusDictEntry(google.protobuf.message.Message):
192
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
193
+ KEY_FIELD_NUMBER: builtins.int
194
+ VALUE_FIELD_NUMBER: builtins.int
195
+ key: builtins.int
196
+ @property
197
+ def value(self) -> global___RunStatus: ...
198
+ def __init__(self,
199
+ *,
200
+ key: builtins.int = ...,
201
+ value: typing.Optional[global___RunStatus] = ...,
202
+ ) -> None: ...
203
+ def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
204
+ def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
205
+
206
+ RUN_STATUS_DICT_FIELD_NUMBER: builtins.int
207
+ @property
208
+ def run_status_dict(self) -> google.protobuf.internal.containers.MessageMap[builtins.int, global___RunStatus]: ...
209
+ def __init__(self,
210
+ *,
211
+ run_status_dict: typing.Optional[typing.Mapping[builtins.int, global___RunStatus]] = ...,
212
+ ) -> None: ...
213
+ def ClearField(self, field_name: typing_extensions.Literal["run_status_dict",b"run_status_dict"]) -> None: ...
214
+ global___GetRunStatusResponse = GetRunStatusResponse
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flwr-nightly
3
- Version: 1.12.0.dev20240920
3
+ Version: 1.12.0.dev20240924
4
4
  Summary: Flower: A Friendly Federated Learning Framework
5
5
  Home-page: https://flower.ai
6
6
  License: Apache-2.0
@@ -1,10 +1,11 @@
1
1
  flwr/__init__.py,sha256=VmBWedrCxqmt4QvUHBLqyVEH6p7zaFMD_oCHerXHSVw,937
2
2
  flwr/cli/__init__.py,sha256=cZJVgozlkC6Ni2Hd_FAIrqefrkCGOV18fikToq-6iLw,720
3
- flwr/cli/app.py,sha256=v66W3QJ226JUy9y51hRwftX53R3oEKl3oOl1Xx-IwgU,1215
3
+ flwr/cli/app.py,sha256=_HDs7HS12Dp7NXIyVrkPs1SKJq3x-XvVZd6y1lvyud4,1255
4
4
  flwr/cli/build.py,sha256=H4xrQPDj7kvZ7Ys65yb-jE86RLEmvIE3pZ3mokZfJHg,5145
5
5
  flwr/cli/config_utils.py,sha256=uJmJAHNoqeSeAC3BAxxoBuYOR9eV3mJg8wrWZgbGp3E,7521
6
6
  flwr/cli/example.py,sha256=1bGDYll3BXQY2kRqSN-oICqS5n1b9m0g0RvXTopXHl4,2215
7
7
  flwr/cli/install.py,sha256=t5tdeKOsTmG3nuInUoSKBVzUU1RnzA096yzYs013VhE,7065
8
+ flwr/cli/log.py,sha256=h01DNZPB8YPHuj-6Kpcuh6b-FBaEkVN0l161VZxwq6A,6803
8
9
  flwr/cli/new/__init__.py,sha256=cQzK1WH4JP2awef1t2UQ2xjl1agVEz9rwutV18SWV1k,789
9
10
  flwr/cli/new/new.py,sha256=wpHBmHOq6X04CPwJDaEgu3H5_MsfoEYsYsv3E-EDhzM,9558
10
11
  flwr/cli/new/templates/__init__.py,sha256=4luU8RL-CK8JJCstQ_ON809W9bNTkY1l9zSaPKBkgwY,725
@@ -143,10 +144,10 @@ flwr/proto/common_pb2.py,sha256=uzSmq0FJdC-MriN9UGPFs7QVIFTKJmX5lyLnzcyZ5WE,2405
143
144
  flwr/proto/common_pb2.pyi,sha256=0ylFO7G79qqLuRg9IQUCBdgyIIFv4m8VzrfoWad4xXU,5394
144
145
  flwr/proto/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
145
146
  flwr/proto/common_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
146
- flwr/proto/control_pb2.py,sha256=qsikYLoAye2IFtPzEd5oPTSEhF09ZkA6VjnCEDh2o7Y,1214
147
+ flwr/proto/control_pb2.py,sha256=yaUkwY2J9uo-fdUIB5aHwVSDOuGunxaUr4ZlggifA_M,1439
147
148
  flwr/proto/control_pb2.pyi,sha256=XbFvpZvvrS7QcH5AFXfpRGl4hQvhd3QdKO6x0oTlCCU,165
148
- flwr/proto/control_pb2_grpc.py,sha256=7ou_lfyACrKJ7YhfU8Da87tgd71NH8C2ExSDbYeXNNw,2511
149
- flwr/proto/control_pb2_grpc.pyi,sha256=2_EKunqhcdwXLDOGbOwFZxpIEpdOW1EFvY-r9MUgUSc,766
149
+ flwr/proto/control_pb2_grpc.py,sha256=FFE21nZvEILWpe1WCR5vAwgYEtpzrdG78-_SsU0gZ7w,5783
150
+ flwr/proto/control_pb2_grpc.pyi,sha256=9DU4sgkzJ497a4Nq6kitZWEG4g_5MO8MevichnO0oAg,1672
150
151
  flwr/proto/driver_pb2.py,sha256=Z2fRF9mBa0cR0p6cItgyp5Q70WUAsh--kPEq8aIJuZk,3176
151
152
  flwr/proto/driver_pb2.pyi,sha256=jUOe6tHWQhddVbB3xtnNvlrztNUcxRHHJS7-LqGO_70,4034
152
153
  flwr/proto/driver_pb2_grpc.py,sha256=SGNmNcpsSWRc0jjNyH0xYNB8a7DAxIsXaL9a0M78vZw,10444
@@ -183,8 +184,8 @@ flwr/proto/recordset_pb2.py,sha256=un8L0kvBcgFXQIiQweOseeIJBjlOozUvQY9uTQ42Dqo,6
183
184
  flwr/proto/recordset_pb2.pyi,sha256=NPzCJWAj1xLWzeZ_xZ6uaObQjQfWGnnqlLtn4J-SoFY,14161
184
185
  flwr/proto/recordset_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
185
186
  flwr/proto/recordset_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
186
- flwr/proto/run_pb2.py,sha256=bzgJZq9xXEWviJAb_SGNZKbH4QLI51SRE11pejhV2yU,3206
187
- flwr/proto/run_pb2.pyi,sha256=oBRYDJwfJ8CWLRGDkPT3CinPWNYIZIHzpjwkIdjbH5A,5404
187
+ flwr/proto/run_pb2.py,sha256=o7qfwQa6o2ExjCBvtUbRQHyVYBGOpVtqg0OkJhZDk1o,4725
188
+ flwr/proto/run_pb2.pyi,sha256=pGK9pNSq_9TdjrVgOkHuWu4GfIC8FIjIIgkRa3VFA68,9054
188
189
  flwr/proto/run_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
189
190
  flwr/proto/run_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
190
191
  flwr/proto/task_pb2.py,sha256=R5GfHgL8IJRI_qHWNeILl1Y9zHjvB0tnCvMHmTgF4Is,2361
@@ -298,8 +299,8 @@ flwr/superexec/exec_grpc.py,sha256=ZPq7EP55Vwj0kRcLVuTCokFqfIgBk-7YmDykZoMKi-c,1
298
299
  flwr/superexec/exec_servicer.py,sha256=TRpwPVl7eI0Y_xlCY6DmVpAo0yFU1gLwzyIeqFw9pyk,4746
299
300
  flwr/superexec/executor.py,sha256=-5J-ZLs-uArro3T2pCq0YQRC65cs18M888nufzdYE4E,2375
300
301
  flwr/superexec/simulation.py,sha256=J6pw-RqCSiUed8I_3MasZH4tl57ZmDebPAHNnbb0-vE,7420
301
- flwr_nightly-1.12.0.dev20240920.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
302
- flwr_nightly-1.12.0.dev20240920.dist-info/METADATA,sha256=wp80fn8CnZQaBGuX45L6rr2iGxssUuNJNAreXmHmQt4,15452
303
- flwr_nightly-1.12.0.dev20240920.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
304
- flwr_nightly-1.12.0.dev20240920.dist-info/entry_points.txt,sha256=WUCbqhLEOzjx_lyATIM0-f0e8kOVaQjzwOvyOxHrMhs,434
305
- flwr_nightly-1.12.0.dev20240920.dist-info/RECORD,,
302
+ flwr_nightly-1.12.0.dev20240924.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
303
+ flwr_nightly-1.12.0.dev20240924.dist-info/METADATA,sha256=uqu5vC87XmCsR6ITGq9dnv0CJnblRG6tIr9YfpvvlDc,15452
304
+ flwr_nightly-1.12.0.dev20240924.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
305
+ flwr_nightly-1.12.0.dev20240924.dist-info/entry_points.txt,sha256=WUCbqhLEOzjx_lyATIM0-f0e8kOVaQjzwOvyOxHrMhs,434
306
+ flwr_nightly-1.12.0.dev20240924.dist-info/RECORD,,