leaf icon indicating copy to clipboard operation
leaf copied to clipboard

Femnist: IndexError: list index out of range.

Open colin-byrneireland opened this issue 5 years ago • 7 comments

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 avatar Jan 02 '20 12:01 colin-byrneireland

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 . . .

colin-byrneireland avatar Jan 03 '20 07:01 colin-byrneireland

I have the same problem.

thothsun avatar Jan 06 '20 01:01 thothsun

Did anyone find a solution to this? :(

Shilpa-Rani avatar Mar 22 '20 00:03 Shilpa-Rani

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

Alfons0329 avatar Mar 26 '20 04:03 Alfons0329

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

MakingL avatar Jun 22 '20 02:06 MakingL

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 avatar Mar 07 '21 05:03 tdye24

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.

tdye24 avatar Mar 07 '21 06:03 tdye24