Wrong indentation at fed_ixi/benchmark line 144-154
Arctic-Xiangjian opened this issue · 3 comments
Arctic-Xiangjian commented
FLamby/flamby/datasets/fed_ixi/benchmark.py
Line 144 in cc3ab34
Hello, I notice that in the above position, you make the result become np.array() which will make next different random seed experiment raise an error. that 'np.array() have no append'.
If delete the indentation of line 144-154. It will give the right output.
Here is the fix code.
results.append(current_results_dict["client_test_0"])
results = np.array(results)
if log:
for i in range(results.shape[0]):
writer = SummaryWriter(log_dir=f"./runs/tests_seed{SEEDS[i]}")
writer.add_scalar("DICE coefficient", results[i], 0)
print("Benchmark Results on pooled IXI:")
print(
f"mDICE on {len(SEEDS)} runs: {results.mean():.2%} \\pm {results.std():.2%}"
)
jeandut commented
Thank you very much @Arctic-Xiangjian, we'll change that ASAP.