burlachenkok / flpytorch

FL_PyTorch: Optimization Research Simulator for Federated Learning
Apache License 2.0
35 stars 8 forks source link

Running Error #9

Closed RogerRogerUSC closed 1 year ago

RogerRogerUSC commented 1 year ago

@burlachenkok Hi, I am really interested in your project and have established the environment. However, when I ran it, I could not get the result successfully. One of the errors I met showed "ValueError: Cannot take a larger sample than population when 'replace=False'." Do you have any solutions for this? Thank you! 1669264799875 Configuration: 1669264904065 image

burlachenkok commented 1 year ago

Dear @RogerRogerUSC thank you for using the solution.

It seems the error is about the total number of clients in the dataset being only 1.

And you're trying to sample more than 1 client, in fact, you sample 10 clients uniformly at random during each round (outer iterations)

Please use the CIFAR10_FL dataset it has a split of datasets across 10 clients.

image

RogerRogerUSC commented 1 year ago

Dear @burlachenkok , thank you for your reply! I just changed the configuration as you instructed, but a new error occurred, so I may still need your help. 1669268933373

burlachenkok commented 1 year ago

Sure!

First of all, I suggest to:

  1. Configure in GUI your experiment
  2. Select in GUI Extra->LogWindow (or press hotkey F2 from the main window)
  3. Please, after you have in the GUI experiment press into "Black Command Line" (Button-1)
  4. If you have no objection about reporting the configuration of your system please report: a. Configuration of Your System (Button-2) b. Information about the version of PyTorch that you're using (Button-3)

All text you can put here.

image

RogerRogerUSC commented 1 year ago

Hi @burlachenkok, I was trying different parameters, models and datasets many times, but it kept showing "RuntimeError: expected scalar type Long but found Double." Have you encountered this error before?

burlachenkok commented 1 year ago

Hello.

  1. You can try to use ResNet-18 not from torch vision, but from the project. (Change global model)
  2. If it will be quite helpful if you provide information about your environment as it has been described above.

Sorry for the late replies, I was on a deadlines.

burlachenkok commented 1 year ago

Dear @RogerRogerUSC . I'm closing the ticket, in case of any problems please reopen it in future.