flwr-nightly 1.11.0.dev20240725__py3-none-any.whl → 1.11.0.dev20240726__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.

@@ -33,7 +33,7 @@ def train(params, grad_fn, X, y):
33
33
  num_examples = X.shape[0]
34
34
  for epochs in range(50):
35
35
  grads = grad_fn(params, X, y)
36
- params = jax.tree.map(lambda p, g: p - 0.05 * g, params, grads)
36
+ params = jax.tree_map(lambda p, g: p - 0.05 * g, params, grads)
37
37
  loss = loss_fn(params, X, y)
38
38
  return params, loss, num_examples
39
39
 
@@ -63,8 +63,10 @@ class SimulationEngine(Executor):
63
63
  def __init__(
64
64
  self,
65
65
  num_supernodes: Optional[int] = None,
66
+ verbose: Optional[bool] = False,
66
67
  ) -> None:
67
68
  self.num_supernodes = num_supernodes
69
+ self.verbose = verbose
68
70
 
69
71
  @override
70
72
  def set_config(
@@ -80,6 +82,8 @@ class SimulationEngine(Executor):
80
82
  Supported configuration key/value pairs:
81
83
  - "num-supernodes": int
82
84
  Number of nodes to register for the simulation.
85
+ - "verbose": bool
86
+ Set verbosity of logs.
83
87
  """
84
88
  if num_supernodes := config.get("num-supernodes"):
85
89
  if not isinstance(num_supernodes, int):
@@ -97,6 +101,13 @@ class SimulationEngine(Executor):
97
101
  "positive integer."
98
102
  )
99
103
 
104
+ if verbose := config.get("verbose"):
105
+ if not isinstance(verbose, bool):
106
+ raise ValueError(
107
+ "The `verbose` value must be a string `true` or `false`."
108
+ )
109
+ self.verbose = verbose
110
+
100
111
  @override
101
112
  def start_run(
102
113
  self,
@@ -121,10 +132,11 @@ class SimulationEngine(Executor):
121
132
  fab_path = install_from_fab(fab_file, None, True)
122
133
 
123
134
  # Install FAB Python package
124
- subprocess.check_call(
135
+ subprocess.run(
125
136
  [sys.executable, "-m", "pip", "install", "--no-deps", str(fab_path)],
126
- stdout=subprocess.DEVNULL,
127
- stderr=subprocess.DEVNULL,
137
+ stdout=None if self.verbose else subprocess.DEVNULL,
138
+ stderr=None if self.verbose else subprocess.DEVNULL,
139
+ check=True,
128
140
  )
129
141
 
130
142
  # Load and validate config
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flwr-nightly
3
- Version: 1.11.0.dev20240725
3
+ Version: 1.11.0.dev20240726
4
4
  Summary: Flower: A Friendly Federated Learning Framework
5
5
  Home-page: https://flower.ai
6
6
  License: Apache-2.0
@@ -37,7 +37,7 @@ flwr/cli/new/templates/app/code/server.pytorch.py.tpl,sha256=FH6jQsUliJueMVzXlrv
37
37
  flwr/cli/new/templates/app/code/server.sklearn.py.tpl,sha256=blkpvISjmPNOaJCyZf5Ezrg8VyxXdHUzxb3vMxcD3Lg,622
38
38
  flwr/cli/new/templates/app/code/server.tensorflow.py.tpl,sha256=LGQaVsfo5rVzgiFTew0z3O6AVwIoDG5rdobnwMpb1yE,852
39
39
  flwr/cli/new/templates/app/code/task.huggingface.py.tpl,sha256=jiCZobChVJkm9OomI9_Q0bCsdGfXMgVh5bY_OulsLMk,3163
40
- flwr/cli/new/templates/app/code/task.jax.py.tpl,sha256=u4o3V019EH79szOw2xzVeC5r9xgQiayPi9ZTIopV2TA,1519
40
+ flwr/cli/new/templates/app/code/task.jax.py.tpl,sha256=FCGo_ZK5bqLKOgLOIERDKGScVcRV6Tk9TocwHVcTQsI,1519
41
41
  flwr/cli/new/templates/app/code/task.mlx.py.tpl,sha256=q4yf8B0hdvHKZUvuhlxpQpyY-wfV5pbqEQ4VHFtuqkU,2899
42
42
  flwr/cli/new/templates/app/code/task.pytorch.py.tpl,sha256=LEBb0-IOAlnRnn-aTAYv80Fgs67wHCSP6PlhNBdsH2k,3939
43
43
  flwr/cli/new/templates/app/code/task.tensorflow.py.tpl,sha256=8sZ8Y5kkaptzwfhAeuoBdth7VFQmD9jjjUrRvcyRrEk,1330
@@ -269,9 +269,9 @@ flwr/superexec/deployment.py,sha256=B--96bAvyotQX-c4-umXIe50uCw4HVjD79rXCQtSUH4,
269
269
  flwr/superexec/exec_grpc.py,sha256=PhqGoZEpTMxSQmUSV8Wgtzb1Za_pHJ-adZqo5RYnDyE,1942
270
270
  flwr/superexec/exec_servicer.py,sha256=fxQAKfgmQRSnYq5anjryfGeRbsZrNFEkuiNcTZhRwiE,2320
271
271
  flwr/superexec/executor.py,sha256=k_adivto6R2U82DADOHNvdtobehBYreRek1gOEBIQnQ,2318
272
- flwr/superexec/simulation.py,sha256=RR1WgqgMmv6HZ2eLvWKCUs9iOQZRj1KbEoAmnG7iyLA,6304
273
- flwr_nightly-1.11.0.dev20240725.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
274
- flwr_nightly-1.11.0.dev20240725.dist-info/METADATA,sha256=-yBOM_UrH2Clxqf3poWCycs9i_nteDWLxM0jUS_eY9g,15672
275
- flwr_nightly-1.11.0.dev20240725.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
276
- flwr_nightly-1.11.0.dev20240725.dist-info/entry_points.txt,sha256=7qBQcA-bDGDxnJmLd9FYqglFQubjCNqyg9M8a-lukps,336
277
- flwr_nightly-1.11.0.dev20240725.dist-info/RECORD,,
272
+ flwr/superexec/simulation.py,sha256=lfdClQYSAIMHe43aJ0Pk-kBw_xoV09LsIMfHo2eo-Ck,6775
273
+ flwr_nightly-1.11.0.dev20240726.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
274
+ flwr_nightly-1.11.0.dev20240726.dist-info/METADATA,sha256=-LmiK3mEHBcipS5_dG5DfgNC1EiZJ7EzRPDHjk5L4Zo,15672
275
+ flwr_nightly-1.11.0.dev20240726.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
276
+ flwr_nightly-1.11.0.dev20240726.dist-info/entry_points.txt,sha256=7qBQcA-bDGDxnJmLd9FYqglFQubjCNqyg9M8a-lukps,336
277
+ flwr_nightly-1.11.0.dev20240726.dist-info/RECORD,,