-
Notifications
You must be signed in to change notification settings - Fork 82
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
Bug Fix [Issue #355] #356
base: main
Are you sure you want to change the base?
Bug Fix [Issue #355] #356
Conversation
✅ Deploy Preview for platodocs canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, the reported Issue#355 is not a bug because the mixed_label_quantity_noniid.py
is designed to only accept consistent_clients_size
and choose the "consistent_clients" randomly.
Thus, what the author did in the PR was to add a new feature to mixed_label_quantity_noniid.py
by also including the consistent_clients
in the configuration.
Therefore, you may need to change the label to be the enhancement.
Second, I, personally, do not think such an 'enhancement' is a good idea because when there are 1000 clients, why does a user want to set the "consistent_clients" (maybe 100 clients) one by one in the configuration file?
According to file description, Furthermore, the primary objective of this configuration is to simulate research scenarios, especially with a limited number of clients. In such cases, having precise control over specific clients becomes crucial. Instead, randomly selecting 30 out of 100 clients to be It would be beneficial to provide a more deterministic way of selecting |
I get your point, and we reached an agreement that the current adjustment is more like an enhancement. Right? If so, it would be great to accept your revision on I noticed that you also adjusted the 'client_id' or 'client_idx' to make it clear. My suggestion is that could you please change it back as if we want to change some code under Therefore, in this PR, it would be great to only maintain the enhancement. But for the change made on |
I agree that this change can be viewed as "feature enhancement" and I will check other |
Thank you very much for your work! For this PR, could you please just remove your changes in If you want to have more work on the 'client_id' of the sampler, you can create a PR specific for this. Thus, we can have more discussion there when necessary. |
…e slight changes to base Plato (TL-System#358) * removed the second assert in check_hyper_parameters. * removed unncessary int () in initialize_personalization. * moved check_hyper_parameters after choose_clients(). * fixed a pylint error, using f-string. * fixed a pylint error. * Changed the name of client type * fixed a pylint error. * Fixed one pylint issue in fedavg_partial * Addressed the issue of PyTorch errors related to CIFAR-10 dataset downloading when clients:do_test is True. * Removed the duplicated _path loading * Improved the data downloading code. * Revised the data downloading code. * Removed all code related to personalized metrics logging * Rewrote the test_model by adding the support for personalized accuracy * Removed all unnecessary operations in the server for personalization * Moved the checkpoint operator to pflbases * Redesigned the personalized client by removing invalid or unnecessary code * Added the random seed setting * Removed all unnecessary code under personalized trainer * Removed all unnecessary training logging * Added the load weights and set it to be False for partial aggregation * Removed unnecessary componenets * Fixed some issues in the client and the trainer * Changed the FedRep in response to the code revision * Added more descriptions in the README.md file * Fixed a typo * Removed useless sentences in README.md * Set default personalized model name to the model name under trainer block * Revised a typo * Added the accuracy std in the logging of Plato * Added more loggins; Cleaned the code to make it more readable * Revised the fedrep example based on the latest update * Moved the personalization indicators to the client part * Revised the fedavg with finetune based on the latest update * Revised the fedrep based on the latest update * Made the clients accuracy recoding as optional * Improved one more checking to make the code more robust --------- Co-authored-by: Dixi Yao <[email protected]> Co-authored-by: Baochun Li <[email protected]>
…llbacks functions as APIs for split learning. (TL-System#357) * moved split learning configuration to config/ * moved split_learning from examples to code_base. * added cut_layer into resnet model. * added split learning in configuration.md * added two callback functions for APIS. * added callback function on_server_forward_from. * added APIs for using callback functions for test model. * added split learning callbacks. * resent the callback for splitlearning callbacks. * added split learning into registry.py. * fixed pylint errors. * added configuration file for split_learning resnet18. * fixed bugs in call back function on_serveR_forward_from. * redesigned the callback API of test model. * revised the configuration file. * revised the comments. * Delete split_learning_lenet5.yml * changed callbacks into functions. The users can override these API functions if necessary. * removed split learning callback. * Fixed spelling mistakes. --------- Co-authored-by: Baochun Li <[email protected]>
* fixed a pylint error. * fixed a pylint errir in trainer_utils.py. * fixed a typo in local_completion_callbacks.py. * Revised a typo * Uploaded a new README.md file with more detailed descriptions * Fixed some comments * Fixed FedBABU algo based on the latest pflbases * Revised the apfl for the latest pflbases * Added an illustration of pflbases in the README.md * Updated the fedper algorithm * Revised the perfedavg * Revised lgfedavg * Revised the hermes algorithm * Revised Ditto based on the latest pflbases * fixed a pylint error. * fixed a pylint error in hermes_pruning.py * fixed pylint error of considering merging. * Removed send mask from Plato and added it to the Hermes * Replaced the send mask with a new callback --------- Co-authored-by: Dixi Yao <[email protected]>
Description
How has this been tested?
Types of changes
consistent_clients
config not works insampler: mixed_label_quantity_noniid
#355Issue#355
consistent_clients
usable, setself.consistent_clients = Config().data.consistent_clients
.If the configuration has
consistent_clients
, thenconsistent_client_size
is useless since it is only used for randomly sampling a set ofconsistent_clients
.Changes:
To make
client_id
consistent (the original code usedclient_id
for the client index), there are some modifications forclient_id
toclient_idx
.The
consistent_clients
in configuration can be set with a list of client ids.Testing
Output:
consistent_clients = [1, 2]
andanchor_classes = [3, 4, 9]
For the index based
clients_contain_classes
,key = client_id -1
Checklist:
The documentation may not need to change according to comments, where the client is labeled by
client_id
rather thanclient_idx
.