-
Notifications
You must be signed in to change notification settings - Fork 88
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
About Dirichlet non-iid Partition #17
Comments
Dear @SpeeeedLee Thank you for your report! Plus, could you please post some example command & corresponding result (with your expected result) that causes problems you listed? Here are some quick notes for your concerns are:
Thank you, and please give me some time! Best, |
Thank you for your quick reply. I am just currently curious about the implementation of the partition method proposed by [Hsu et al., 2019], and it's totally fine to take your time. About the reply you listed, I want to ask further in the following:
b. if the next few clients happen to want samples from those depleted classes, the second while loop will be triggerd since the "satisfied_counts" < "ideal_counts" c. however, the sampled number in the second while loop is identical to the first while loop :
so those clients will sample approximately 2x ideal_ccounts (if the second sample result is again want samples from depleted classes, then a third while loop might triggered --> ~ 3x ideal counts ...) d. then the final few clients will never have enough remaning samples. Maybe I misunderstood some concepts of your code, so please point out if anything in above is incorrect, thank you ! |
Sorry for super late reply 😢 |
Hello, I am working on non-iid partition method in FL, and have some problems with Dirichlet partition.
In ./src/loaders/split.py, it seems like that :
Do not consider the situation where a client requires number of data in a class that is larger than remaining data in that class
Do not properly update the remaining class_idcs :
class_indices[required_class] = class_indices[required_class][:required_counts[idx]]
maybe it should be:
class_indices[required_class] = class_indices[required_class][required_counts[idx]:]
If the satisfied_counts is less than ideal_counts in the first while loop, then in the second while loop, the client is just given another ideal_counts sample (sampled = np.random.choice(args.num_classes, ideal_counts, p=cat_param)), which may lead to the client having sample way too much than ideal_counts.
Thanks for your code and hope you can help me with these concerns
The text was updated successfully, but these errors were encountered: