Skip to content

Commit c26dad1

Browse files
authored
fix(framework): Fix Bulyan strategy to avoid TyperError during Array instantiation (#6524)
1 parent e879abb commit c26dad1

File tree

1 file changed

+7
-1
lines changed
  • framework/py/flwr/serverapp/strategy

1 file changed

+7
-1
lines changed

framework/py/flwr/serverapp/strategy/bulyan.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,13 @@ def aggregate_train(
185185

186186
# Convert to ArrayRecord
187187
arrays = ArrayRecord(
188-
dict(zip(array_keys, map(Array, aggregated_ndarrays), strict=True))
188+
dict(
189+
zip(
190+
array_keys,
191+
(Array(np.asarray(arr)) for arr in aggregated_ndarrays),
192+
strict=True,
193+
)
194+
)
189195
)
190196

191197
# Aggregate MetricRecords

0 commit comments

Comments
 (0)