krishnap25 / RFA

Robust aggregation for federated learning with the RFA algorithm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"division by zero" when running shakespeare experiments

amitport opened this issue · comments

Hi I'm trying to reproduce some of the results but I get the following error when following the readme (after data/shakespeare/preprocess.sh, in all shakespeare experiment logs)

thank you

Traceback (most recent call last):
  File "models/main.py", line 174, in <module>
    main()
  File "models/main.py", line 63, in main
    fraction_corrupt=args.fraction_corrupt)
  File "RFA\models\utils\main_utils.py", line 171, in setup_clients
    corrupted_clients = apply_corruption_all(all_clients, dataset, corruption, fraction_corrupt, seed)
  File "RFA\models\utils\main_utils.py", line 242, in apply_corruption_all
    print('Corrupting {:0.4f} fraction of data'.format(num_corrupted_data_pts / total_num_data_pts))
ZeroDivisionError: division by zero

Hi,

Thanks for raising this issue. I have been a little busy with travel and other previous commitments.

This error appears to be caused by the changing format of the Shakespeare dataset on Project Gutenberg. See also this commit. I will try to fix this within the next 2 weeks.

Thanks,
Krishna

Hi, I'm trying to reproduce some of the results but I have some questions to ask you when following the readme.
If several json files (like femnist/data/all_data/all_data.json mentioned in data/femnist/readme) should be generated automatically atfer I ran data/femnist/preprocess.sh using time ./preprocess.sh -s niid --sf 1.0 -k 100 -t sample following the readme ? But I don't get json file like this.

Thank you!