Code Monkey home page Code Monkey logo

Comments (17)

chaoyanghe avatar chaoyanghe commented on July 22, 2024

@iuserea I just run our code using 4 and 8 compute nodes, it works well. The issue you mentioned happens when you have only 1 compute node but do not change the compute topology. To address this issue, you can try to modify the computing topology at init_training_device() function, in which you can force all workers/clients run in the same GPU device ID (since many clients/workers share the same GPU device, you may also need to make the batch size smaller to fit the memory constraints, which may degrades the accuracy a little bit and leads to a relatively slow training speed). Besides, you should also change the client_number/worker_number at run_xxx.sh

from fedml.

iuserea avatar iuserea commented on July 22, 2024

@chaoyanghe Could fedgkt algorithm be running with only 2 clients or even one client?I tried but I failed.

from fedml.

iuserea avatar iuserea commented on July 22, 2024

run_fedgkt.sh:
image

from fedml.

iuserea avatar iuserea commented on July 22, 2024

main_fedgkt.py:
image

from fedml.

iuserea avatar iuserea commented on July 22, 2024

CMD for 10 clients:
sh run_FedGKT.sh 8 cifar10 homo 10 10 1 Adam 0.001 1 0 resnet56 fedml_resnet56_homo_cifar10 "./../../../data/cifar10" 64 10

from fedml.

iuserea avatar iuserea commented on July 22, 2024

The success flag I found is that b_all_received = True.
When the process failed, it either failed in b_all_received = false or 'b_all_received' variable even didn't appear after all the clients training has finished.
image
However it's just the surface of the real problem.

from fedml.

iuserea avatar iuserea commented on July 22, 2024

When I set client/worker's number to 2,fedgkt algorithm will also create 8 processes which may result in the failure of itself.
image

from fedml.

chaoyanghe avatar chaoyanghe commented on July 22, 2024

Change your sh script: -n is still 9

from fedml.

iuserea avatar iuserea commented on July 22, 2024

@chaoyanghe
The -n option is not essential for training of two clients.
image
The quesion is when training the two clients,the message below didn't appear.
handle_message_receive_feature_and_logits_from_client
add_model. index = 7

from fedml.

chaoyanghe avatar chaoyanghe commented on July 22, 2024

Hi @iuserea We have supported GPU mapping, please have a look at this:

device = mapping_processes_to_gpu_device_from_yaml_file(process_id, worker_number, args.gpu_mapping_file, args.gpu_mapping_key)

from fedml.

rambo-coder avatar rambo-coder commented on July 22, 2024

Hi @iuserea , Could you please share your configuration of both software and hardware?

from fedml.

rambo-coder avatar rambo-coder commented on July 22, 2024

I only have two gpus in one server, how can I train fedgdk?

from fedml.

rambo-coder avatar rambo-coder commented on July 22, 2024

@iuserea Hi, How do you set your mpi_host_file?

from fedml.

rambo-coder avatar rambo-coder commented on July 22, 2024

image

from fedml.

rambo-coder avatar rambo-coder commented on July 22, 2024

image

from fedml.

korawat-tanwisuth avatar korawat-tanwisuth commented on July 22, 2024

@rambo-coder @iuserea @chaoyanghe Did you guys figure out how to run fedgkt on a single machine with multiple gpus? I followed the thread but was not able to make it finish with success (b_all_received=False).

@chaoyanghe Most researchers has a single machine with multiple gpus. It would be nice to have a guide for this especially if the library is designed specifically for researchers.

from fedml.

SahadevPoudel avatar SahadevPoudel commented on July 22, 2024

@rambo-coder @iuserea @chaoyanghe Did you guys figure out how to run fedgkt on a single machine with multiple gpus? I followed the thread but was not able to make it finish with success (b_all_received=False).

@chaoyanghe Most researchers has a single machine with multiple gpus. It would be nice to have a guide for this especially if the library is designed specifically for researchers.

Hello @korawat-tanwisuth Did you run FedGKT on a single machine with multiple gpus?

from fedml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.