RFA icon indicating copy to clipboard operation
RFA copied to clipboard

"division by zero" when running shakespeare experiments

Open amitport opened this issue 5 years ago • 2 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

amitport avatar Aug 04 '19 08:08 amitport

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

krishnap25 avatar Aug 20 '19 20:08 krishnap25

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!

JSparks7 avatar Nov 06 '22 05:11 JSparks7