google-research / federated

A collection of Google research projects related to Federated Learning and Federated Analytics.
Apache License 2.0
692 stars 196 forks source link

fix: allow one optimizer to be a prefix of another #3

Closed amitport closed 4 years ago

amitport commented 4 years ago

fix an issue when adding an optimizer with the same prefix as another. For example, adding adamW will not work without this fix, because in a couple of places only the prefix is checked so the script will match as adam

amitport commented 4 years ago

Similar functionality is used in utils/utils_impl.py. Would you mind adding them to this change? Looks good by the way. Apologies for the duplication, there are subtle differences that are on my list to merge.

done and rebased

zcharles8 commented 4 years ago

@amitport Thanks! I'll submit this internally again (referencing your contribution).

nightldj commented 4 years ago

Thanks @amitport and @zcharles8. Please move to ISSUES for more discussions. Thanks for the understanding.

zcharles8 commented 4 years ago

This change was included as part of 700cbc24a92575d761815895e845d9dbf608d677. Apologies for the lack of attribution; we faced some internal issues when pushing updates and had to merge the changes as one.