Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
colin-byrneireland opened this issue Jan 2, 2020 · 7 comments
Open

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

colin-byrneireland opened this issue Jan 2, 2020 · 7 comments

Comments

@colin-byrneireland
Copy link

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
Copy link
Author

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
Copy link

thothsun commented Jan 6, 2020

I have the same problem.

@Shilpa-Rani
Copy link

Did anyone find a solution to this? :(

@Alfons0329
Copy link

Alfons0329 commented Mar 26, 2020

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

@MakingL
Copy link

MakingL commented Jun 22, 2020

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
Copy link

tdye24 commented Mar 7, 2021

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
Copy link

tdye24 commented Mar 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants