TalwalkarLab / leaf

Leaf: A Benchmark for Federated Settings
BSD 2-Clause "Simplified" License
852 stars 244 forks source link

Femnist: IndexError: list index out of range. #22

Open colin-byrneireland opened 4 years ago

colin-byrneireland commented 4 years ago

When I run python main.py -dataset femnist -model cnn -lr 0.06 --minibatch 0.1 --clients-per-round 3 --num-rounds 20

I get the following image

======================End of Report========================== Clients in Total: 0 --- Random Initialization --- --- Round 1 of 20: Training 3 Clients --- Traceback (most recent call last): File "main.py", line 186, in main() File "main.py", line 87, in main server.update_model() File "/mnt/c/ul/ai/Thesis/DataSet/FEMNIST/leaf-master/leaf-master/models/server.py", line 72, in update_model base = [0] * len(self.updates[0][1]) IndexError: list index out of range

Any ideas welcome.

colin-byrneireland commented 4 years ago

Sorry forgot to mention that I just used the default code no modifications at all. Not sure if I'm doing a prep step wrong, compatibility issue or issue with the default code ?

Thks Colin . . .

thothsun commented 4 years ago

I have the same problem.

Shilpa-Rani commented 4 years ago

Did anyone find a solution to this? :(

Alfons0329 commented 4 years ago

Same for CNN in celebA, maybe it is the common bug for image-based classification?

MakingL commented 4 years ago

I also got an error when running python main.py -dataset femnist -model cnn -lr 0.06 --minibatch 0.1 --clients-per-round 3 --num-rounds 2000.

My running environment is docker. I successfully generated data by leaf/data/femnist/ $> ./preprocess.sh -s niid --sf 0.05 -k 0 -t sample --smplseed 1549786595 --spltseed 1549786796, but got an error when running the model:

leaf1

leaf2

leaf

tdye24 commented 3 years ago

I also got an error when running python main.py -dataset femnist -model cnn -lr 0.06 --minibatch 0.1 --clients-per-round 3 --num-rounds 2000.

My running environment is docker. I successfully generated data by leaf/data/femnist/ $> ./preprocess.sh -s niid --sf 0.05 -k 0 -t sample --smplseed 1549786595 --spltseed 1549786796, but got an error when running the model:

leaf1

leaf2

leaf

Refer to my request.https://github.com/TalwalkarLab/leaf/pull/39

tdye24 commented 3 years ago

When I run python main.py -dataset femnist -model cnn -lr 0.06 --minibatch 0.1 --clients-per-round 3 --num-rounds 20

I get the following image

======================End of Report========================== Clients in Total: 0 --- Random Initialization --- --- Round 1 of 20: Training 3 Clients --- Traceback (most recent call last): File "main.py", line 186, in main() File "main.py", line 87, in main server.update_model() File "/mnt/c/ul/ai/Thesis/DataSet/FEMNIST/leaf-master/leaf-master/models/server.py", line 72, in update_model base = [0] * len(self.updates[0][1]) IndexError: list index out of range

Any ideas welcome.

I think, you didn't load the dataset properly.